/* * Copyright 2018-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; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Contains information about the phone configuration settings for a user. *

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

* The phone type. *

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

*
*/ private Integer afterContactWorkTimeLimit; /** *

* The phone number for the user's desk phone. *

*/ private String deskPhoneNumber; /** *

* The phone type. *

* * @param phoneType * The phone type. * @see PhoneType */ public void setPhoneType(String phoneType) { this.phoneType = phoneType; } /** *

* The phone type. *

* * @return The phone type. * @see PhoneType */ public String getPhoneType() { return this.phoneType; } /** *

* The phone type. *

* * @param phoneType * The phone type. * @return Returns a reference to this object so that method calls can be chained together. * @see PhoneType */ public UserPhoneConfig withPhoneType(String phoneType) { setPhoneType(phoneType); return this; } /** *

* The phone type. *

* * @param phoneType * The phone type. * @return Returns a reference to this 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. *

* * @param autoAccept * The Auto accept setting. */ public void setAutoAccept(Boolean autoAccept) { this.autoAccept = autoAccept; } /** *

* The Auto accept setting. *

* * @return The Auto accept setting. */ public Boolean getAutoAccept() { return this.autoAccept; } /** *

* The Auto accept setting. *

* * @param autoAccept * The Auto accept setting. * @return Returns a reference to this object so that method calls can be chained together. */ public UserPhoneConfig withAutoAccept(Boolean autoAccept) { setAutoAccept(autoAccept); return this; } /** *

* The Auto accept setting. *

* * @return The Auto accept setting. */ public Boolean isAutoAccept() { return this.autoAccept; } /** *

* The After Call Work (ACW) timeout setting, in seconds. *

* *

* When returned by a SearchUsers call, AfterContactWorkTimeLimit is returned in * milliseconds. *

*
* * @param afterContactWorkTimeLimit * The After Call Work (ACW) timeout setting, in seconds.

*

* When returned by a SearchUsers call, AfterContactWorkTimeLimit is returned in * milliseconds. *

*/ public void setAfterContactWorkTimeLimit(Integer afterContactWorkTimeLimit) { this.afterContactWorkTimeLimit = afterContactWorkTimeLimit; } /** *

* The After Call Work (ACW) timeout setting, in seconds. *

* *

* When returned by a SearchUsers call, AfterContactWorkTimeLimit is returned in * milliseconds. *

*
* * @return The After Call Work (ACW) timeout setting, in seconds.

*

* When returned by a SearchUsers call, AfterContactWorkTimeLimit is returned in * milliseconds. *

*/ public Integer getAfterContactWorkTimeLimit() { return this.afterContactWorkTimeLimit; } /** *

* The After Call Work (ACW) timeout setting, in seconds. *

* *

* When returned by a SearchUsers call, AfterContactWorkTimeLimit is returned in * milliseconds. *

*
* * @param afterContactWorkTimeLimit * The After Call Work (ACW) timeout setting, in seconds.

*

* When returned by a SearchUsers call, AfterContactWorkTimeLimit is returned in * milliseconds. *

* @return Returns a reference to this object so that method calls can be chained together. */ public UserPhoneConfig withAfterContactWorkTimeLimit(Integer afterContactWorkTimeLimit) { setAfterContactWorkTimeLimit(afterContactWorkTimeLimit); return this; } /** *

* The phone number for the user's desk phone. *

* * @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. *

* * @return The phone number for the user's desk phone. */ public String getDeskPhoneNumber() { return this.deskPhoneNumber; } /** *

* The phone number for the user's desk phone. *

* * @param deskPhoneNumber * The phone number for the user's desk phone. * @return Returns a reference to this object so that method calls can be chained together. */ public UserPhoneConfig withDeskPhoneNumber(String deskPhoneNumber) { setDeskPhoneNumber(deskPhoneNumber); 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 (getPhoneType() != null) sb.append("PhoneType: ").append(getPhoneType()).append(","); if (getAutoAccept() != null) sb.append("AutoAccept: ").append(getAutoAccept()).append(","); if (getAfterContactWorkTimeLimit() != null) sb.append("AfterContactWorkTimeLimit: ").append(getAfterContactWorkTimeLimit()).append(","); if (getDeskPhoneNumber() != null) sb.append("DeskPhoneNumber: ").append(getDeskPhoneNumber()); sb.append("}"); return sb.toString(); } @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; } @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 UserPhoneConfig clone() { try { return (UserPhoneConfig) 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.connect.model.transform.UserPhoneConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }