/* * Copyright 2010-2023 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.connect.model; import java.io.Serializable; /** *
* Contains information about the phone configuration settings for a user. *
*/ public class UserPhoneConfig implements Serializable { /** ** The phone type. *
*
* Constraints:
* Allowed Values: SOFT_PHONE, DESK_PHONE
*/
private String phoneType;
/**
*
* The Auto accept setting. *
*/ private Boolean autoAccept; /** ** The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in milliseconds.
*
* Constraints:
* Range: 0 -
*/
private Integer afterContactWorkTimeLimit;
/**
*
* The phone number for the user's desk phone. *
*
* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
*/
private String deskPhoneNumber;
/**
*
* The phone type. *
*
* Constraints:
* Allowed Values: SOFT_PHONE, DESK_PHONE
*
* @return
* The phone type. *
* @see PhoneType */ public String getPhoneType() { return phoneType; } /** ** The phone type. *
*
* Constraints:
* Allowed Values: SOFT_PHONE, DESK_PHONE
*
* @param phoneType
* The phone type. *
* @see PhoneType */ public void setPhoneType(String phoneType) { this.phoneType = phoneType; } /** ** The phone type. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SOFT_PHONE, DESK_PHONE
*
* @param phoneType
* The phone type. *
* @return A reference to this updated object so that method calls can be * chained together. * @see PhoneType */ public UserPhoneConfig withPhoneType(String phoneType) { this.phoneType = phoneType; return this; } /** ** The phone type. *
*
* Constraints:
* Allowed Values: SOFT_PHONE, DESK_PHONE
*
* @param phoneType
* The phone type. *
* @see PhoneType */ public void setPhoneType(PhoneType phoneType) { this.phoneType = phoneType.toString(); } /** ** The phone type. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SOFT_PHONE, DESK_PHONE
*
* @param phoneType
* The phone type. *
* @return A reference to this updated object so that method calls can be * chained together. * @see PhoneType */ public UserPhoneConfig withPhoneType(PhoneType phoneType) { this.phoneType = phoneType.toString(); return this; } /** ** The Auto accept setting. *
* * @return* The Auto accept setting. *
*/ public Boolean isAutoAccept() { return autoAccept; } /** ** The Auto accept setting. *
* * @return* The Auto accept setting. *
*/ public Boolean getAutoAccept() { return autoAccept; } /** ** The Auto accept setting. *
* * @param autoAccept* The Auto accept setting. *
*/ public void setAutoAccept(Boolean autoAccept) { this.autoAccept = autoAccept; } /** ** The Auto accept setting. *
** Returns a reference to this object so that method calls can be chained * together. * * @param autoAccept
* The Auto accept setting. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UserPhoneConfig withAutoAccept(Boolean autoAccept) { this.autoAccept = autoAccept; return this; } /** ** The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in milliseconds.
*
* Constraints:
* Range: 0 -
*
* @return
* The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in
* milliseconds.
*
* The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in milliseconds.
*
* Constraints:
* Range: 0 -
*
* @param afterContactWorkTimeLimit
* The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in
* milliseconds.
*
* The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in milliseconds.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param afterContactWorkTimeLimit
* The After Call Work (ACW) timeout setting, in seconds. *
*
* When returned by a SearchUsers
call,
* AfterContactWorkTimeLimit
is returned in
* milliseconds.
*
* The phone number for the user's desk phone. *
*
* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
*
* @return
* The phone number for the user's desk phone. *
*/ public String getDeskPhoneNumber() { return deskPhoneNumber; } /** ** The phone number for the user's desk phone. *
*
* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
*
* @param deskPhoneNumber
* The phone number for the user's desk phone. *
*/ public void setDeskPhoneNumber(String deskPhoneNumber) { this.deskPhoneNumber = deskPhoneNumber; } /** ** The phone number for the user's desk phone. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
*
* @param deskPhoneNumber
* The phone number for the user's desk phone. *
* @return A reference to this updated object so that method calls can be * chained together. */ public UserPhoneConfig withDeskPhoneNumber(String deskPhoneNumber) { this.deskPhoneNumber = deskPhoneNumber; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPhoneType() != null) sb.append("PhoneType: " + getPhoneType() + ","); if (getAutoAccept() != null) sb.append("AutoAccept: " + getAutoAccept() + ","); if (getAfterContactWorkTimeLimit() != null) sb.append("AfterContactWorkTimeLimit: " + getAfterContactWorkTimeLimit() + ","); if (getDeskPhoneNumber() != null) sb.append("DeskPhoneNumber: " + getDeskPhoneNumber()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPhoneType() == null) ? 0 : getPhoneType().hashCode()); hashCode = prime * hashCode + ((getAutoAccept() == null) ? 0 : getAutoAccept().hashCode()); hashCode = prime * hashCode + ((getAfterContactWorkTimeLimit() == null) ? 0 : getAfterContactWorkTimeLimit() .hashCode()); hashCode = prime * hashCode + ((getDeskPhoneNumber() == null) ? 0 : getDeskPhoneNumber().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UserPhoneConfig == false) return false; UserPhoneConfig other = (UserPhoneConfig) obj; if (other.getPhoneType() == null ^ this.getPhoneType() == null) return false; if (other.getPhoneType() != null && other.getPhoneType().equals(this.getPhoneType()) == false) return false; if (other.getAutoAccept() == null ^ this.getAutoAccept() == null) return false; if (other.getAutoAccept() != null && other.getAutoAccept().equals(this.getAutoAccept()) == false) return false; if (other.getAfterContactWorkTimeLimit() == null ^ this.getAfterContactWorkTimeLimit() == null) return false; if (other.getAfterContactWorkTimeLimit() != null && other.getAfterContactWorkTimeLimit().equals(this.getAfterContactWorkTimeLimit()) == false) return false; if (other.getDeskPhoneNumber() == null ^ this.getDeskPhoneNumber() == null) return false; if (other.getDeskPhoneNumber() != null && other.getDeskPhoneNumber().equals(this.getDeskPhoneNumber()) == false) return false; return true; } }