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

com.amazonaws.services.ssmcontacts.model.RotationShift 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 shift that belongs to an on-call rotation. *

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

* The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation. *

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

* The time a shift rotation begins. *

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

* The time a shift rotation ends. *

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

* The type of shift rotation. *

*/ private String type; /** *

* Additional information about an on-call rotation shift. *

*/ private ShiftDetails shiftDetails; /** *

* The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation. *

* * @return The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation. */ public java.util.List getContactIds() { return contactIds; } /** *

* The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation. *

* * @param contactIds * The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation. */ 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 who are part of the shift rotation. *

*

* 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 who are part of the shift rotation. * @return Returns a reference to this object so that method calls can be chained together. */ public RotationShift 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 who are part of the shift rotation. *

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

* The time a shift rotation begins. *

* * @param startTime * The time a shift rotation begins. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The time a shift rotation begins. *

* * @return The time a shift rotation begins. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The time a shift rotation begins. *

* * @param startTime * The time a shift rotation begins. * @return Returns a reference to this object so that method calls can be chained together. */ public RotationShift withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The time a shift rotation ends. *

* * @param endTime * The time a shift rotation ends. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The time a shift rotation ends. *

* * @return The time a shift rotation ends. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The time a shift rotation ends. *

* * @param endTime * The time a shift rotation ends. * @return Returns a reference to this object so that method calls can be chained together. */ public RotationShift withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* The type of shift rotation. *

* * @param type * The type of shift rotation. * @see ShiftType */ public void setType(String type) { this.type = type; } /** *

* The type of shift rotation. *

* * @return The type of shift rotation. * @see ShiftType */ public String getType() { return this.type; } /** *

* The type of shift rotation. *

* * @param type * The type of shift rotation. * @return Returns a reference to this object so that method calls can be chained together. * @see ShiftType */ public RotationShift withType(String type) { setType(type); return this; } /** *

* The type of shift rotation. *

* * @param type * The type of shift rotation. * @return Returns a reference to this object so that method calls can be chained together. * @see ShiftType */ public RotationShift withType(ShiftType type) { this.type = type.toString(); return this; } /** *

* Additional information about an on-call rotation shift. *

* * @param shiftDetails * Additional information about an on-call rotation shift. */ public void setShiftDetails(ShiftDetails shiftDetails) { this.shiftDetails = shiftDetails; } /** *

* Additional information about an on-call rotation shift. *

* * @return Additional information about an on-call rotation shift. */ public ShiftDetails getShiftDetails() { return this.shiftDetails; } /** *

* Additional information about an on-call rotation shift. *

* * @param shiftDetails * Additional information about an on-call rotation shift. * @return Returns a reference to this object so that method calls can be chained together. */ public RotationShift withShiftDetails(ShiftDetails shiftDetails) { setShiftDetails(shiftDetails); 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 (getContactIds() != null) sb.append("ContactIds: ").append(getContactIds()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getShiftDetails() != null) sb.append("ShiftDetails: ").append(getShiftDetails()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RotationShift == false) return false; RotationShift other = (RotationShift) obj; 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.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getShiftDetails() == null ^ this.getShiftDetails() == null) return false; if (other.getShiftDetails() != null && other.getShiftDetails().equals(this.getShiftDetails()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContactIds() == null) ? 0 : getContactIds().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getShiftDetails() == null) ? 0 : getShiftDetails().hashCode()); return hashCode; } @Override public RotationShift clone() { try { return (RotationShift) 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.RotationShiftMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy