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

* Information about the instance. *

*/ public class InstanceSummary implements Serializable { /** *

* The identifier of the instance. *

*

* Constraints:
* Length: 1 - 100
*/ private String id; /** *

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

*/ private String arn; /** *

* The identity management type of the instance. *

*

* Constraints:
* Allowed Values: SAML, CONNECT_MANAGED, EXISTING_DIRECTORY */ private String identityManagementType; /** *

* The alias of the instance. *

*

* Constraints:
* Length: 1 - 45
* Pattern: ^(?!d-)([\da-zA-Z]+)([-]*[\da-zA-Z])*$
*/ private String instanceAlias; /** *

* When the instance was created. *

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

* The service role of the instance. *

*/ private String serviceRole; /** *

* The state of the instance. *

*

* Constraints:
* Allowed Values: CREATION_IN_PROGRESS, ACTIVE, CREATION_FAILED */ private String instanceStatus; /** *

* Whether inbound calls are enabled. *

*/ private Boolean inboundCallsEnabled; /** *

* Whether outbound calls are enabled. *

*/ private Boolean outboundCallsEnabled; /** *

* This URL allows contact center users to access Amazon Connect admin * website. *

*/ private String instanceAccessUrl; /** *

* The identifier of the instance. *

*

* Constraints:
* Length: 1 - 100
* * @return

* The identifier of the instance. *

*/ public String getId() { return id; } /** *

* The identifier of the instance. *

*

* Constraints:
* Length: 1 - 100
* * @param id

* The identifier of the instance. *

*/ public void setId(String id) { this.id = id; } /** *

* The identifier of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 100
* * @param id

* The identifier of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withId(String id) { this.id = id; return this; } /** *

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

* * @return

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

*/ public String getArn() { return arn; } /** *

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

* * @param arn

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

*/ public void setArn(String arn) { this.arn = arn; } /** *

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

*

* Returns a reference to this object so that method calls can be chained * together. * * @param arn

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

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withArn(String arn) { this.arn = arn; return this; } /** *

* The identity management type of the instance. *

*

* Constraints:
* Allowed Values: SAML, CONNECT_MANAGED, EXISTING_DIRECTORY * * @return

* The identity management type of the instance. *

* @see DirectoryType */ public String getIdentityManagementType() { return identityManagementType; } /** *

* The identity management type of the instance. *

*

* Constraints:
* Allowed Values: SAML, CONNECT_MANAGED, EXISTING_DIRECTORY * * @param identityManagementType

* The identity management type of the instance. *

* @see DirectoryType */ public void setIdentityManagementType(String identityManagementType) { this.identityManagementType = identityManagementType; } /** *

* The identity management type of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: SAML, CONNECT_MANAGED, EXISTING_DIRECTORY * * @param identityManagementType

* The identity management type of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. * @see DirectoryType */ public InstanceSummary withIdentityManagementType(String identityManagementType) { this.identityManagementType = identityManagementType; return this; } /** *

* The identity management type of the instance. *

*

* Constraints:
* Allowed Values: SAML, CONNECT_MANAGED, EXISTING_DIRECTORY * * @param identityManagementType

* The identity management type of the instance. *

* @see DirectoryType */ public void setIdentityManagementType(DirectoryType identityManagementType) { this.identityManagementType = identityManagementType.toString(); } /** *

* The identity management type of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: SAML, CONNECT_MANAGED, EXISTING_DIRECTORY * * @param identityManagementType

* The identity management type of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. * @see DirectoryType */ public InstanceSummary withIdentityManagementType(DirectoryType identityManagementType) { this.identityManagementType = identityManagementType.toString(); return this; } /** *

* The alias of the instance. *

*

* Constraints:
* Length: 1 - 45
* Pattern: ^(?!d-)([\da-zA-Z]+)([-]*[\da-zA-Z])*$
* * @return

* The alias of the instance. *

*/ public String getInstanceAlias() { return instanceAlias; } /** *

* The alias of the instance. *

*

* Constraints:
* Length: 1 - 45
* Pattern: ^(?!d-)([\da-zA-Z]+)([-]*[\da-zA-Z])*$
* * @param instanceAlias

* The alias of the instance. *

*/ public void setInstanceAlias(String instanceAlias) { this.instanceAlias = instanceAlias; } /** *

* The alias of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 45
* Pattern: ^(?!d-)([\da-zA-Z]+)([-]*[\da-zA-Z])*$
* * @param instanceAlias

* The alias of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withInstanceAlias(String instanceAlias) { this.instanceAlias = instanceAlias; return this; } /** *

* When the instance was created. *

* * @return

* When the instance was created. *

*/ public java.util.Date getCreatedTime() { return createdTime; } /** *

* When the instance was created. *

* * @param createdTime

* When the instance was created. *

*/ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** *

* When the instance was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param createdTime

* When the instance was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; return this; } /** *

* The service role of the instance. *

* * @return

* The service role of the instance. *

*/ public String getServiceRole() { return serviceRole; } /** *

* The service role of the instance. *

* * @param serviceRole

* The service role of the instance. *

*/ public void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } /** *

* The service role of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param serviceRole

* The service role of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withServiceRole(String serviceRole) { this.serviceRole = serviceRole; return this; } /** *

* The state of the instance. *

*

* Constraints:
* Allowed Values: CREATION_IN_PROGRESS, ACTIVE, CREATION_FAILED * * @return

* The state of the instance. *

* @see InstanceStatus */ public String getInstanceStatus() { return instanceStatus; } /** *

* The state of the instance. *

*

* Constraints:
* Allowed Values: CREATION_IN_PROGRESS, ACTIVE, CREATION_FAILED * * @param instanceStatus

* The state of the instance. *

* @see InstanceStatus */ public void setInstanceStatus(String instanceStatus) { this.instanceStatus = instanceStatus; } /** *

* The state of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: CREATION_IN_PROGRESS, ACTIVE, CREATION_FAILED * * @param instanceStatus

* The state of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. * @see InstanceStatus */ public InstanceSummary withInstanceStatus(String instanceStatus) { this.instanceStatus = instanceStatus; return this; } /** *

* The state of the instance. *

*

* Constraints:
* Allowed Values: CREATION_IN_PROGRESS, ACTIVE, CREATION_FAILED * * @param instanceStatus

* The state of the instance. *

* @see InstanceStatus */ public void setInstanceStatus(InstanceStatus instanceStatus) { this.instanceStatus = instanceStatus.toString(); } /** *

* The state of the instance. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: CREATION_IN_PROGRESS, ACTIVE, CREATION_FAILED * * @param instanceStatus

* The state of the instance. *

* @return A reference to this updated object so that method calls can be * chained together. * @see InstanceStatus */ public InstanceSummary withInstanceStatus(InstanceStatus instanceStatus) { this.instanceStatus = instanceStatus.toString(); return this; } /** *

* Whether inbound calls are enabled. *

* * @return

* Whether inbound calls are enabled. *

*/ public Boolean isInboundCallsEnabled() { return inboundCallsEnabled; } /** *

* Whether inbound calls are enabled. *

* * @return

* Whether inbound calls are enabled. *

*/ public Boolean getInboundCallsEnabled() { return inboundCallsEnabled; } /** *

* Whether inbound calls are enabled. *

* * @param inboundCallsEnabled

* Whether inbound calls are enabled. *

*/ public void setInboundCallsEnabled(Boolean inboundCallsEnabled) { this.inboundCallsEnabled = inboundCallsEnabled; } /** *

* Whether inbound calls are enabled. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param inboundCallsEnabled

* Whether inbound calls are enabled. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withInboundCallsEnabled(Boolean inboundCallsEnabled) { this.inboundCallsEnabled = inboundCallsEnabled; return this; } /** *

* Whether outbound calls are enabled. *

* * @return

* Whether outbound calls are enabled. *

*/ public Boolean isOutboundCallsEnabled() { return outboundCallsEnabled; } /** *

* Whether outbound calls are enabled. *

* * @return

* Whether outbound calls are enabled. *

*/ public Boolean getOutboundCallsEnabled() { return outboundCallsEnabled; } /** *

* Whether outbound calls are enabled. *

* * @param outboundCallsEnabled

* Whether outbound calls are enabled. *

*/ public void setOutboundCallsEnabled(Boolean outboundCallsEnabled) { this.outboundCallsEnabled = outboundCallsEnabled; } /** *

* Whether outbound calls are enabled. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param outboundCallsEnabled

* Whether outbound calls are enabled. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withOutboundCallsEnabled(Boolean outboundCallsEnabled) { this.outboundCallsEnabled = outboundCallsEnabled; return this; } /** *

* This URL allows contact center users to access Amazon Connect admin * website. *

* * @return

* This URL allows contact center users to access Amazon Connect * admin website. *

*/ public String getInstanceAccessUrl() { return instanceAccessUrl; } /** *

* This URL allows contact center users to access Amazon Connect admin * website. *

* * @param instanceAccessUrl

* This URL allows contact center users to access Amazon Connect * admin website. *

*/ public void setInstanceAccessUrl(String instanceAccessUrl) { this.instanceAccessUrl = instanceAccessUrl; } /** *

* This URL allows contact center users to access Amazon Connect admin * website. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param instanceAccessUrl

* This URL allows contact center users to access Amazon Connect * admin website. *

* @return A reference to this updated object so that method calls can be * chained together. */ public InstanceSummary withInstanceAccessUrl(String instanceAccessUrl) { this.instanceAccessUrl = instanceAccessUrl; 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 (getId() != null) sb.append("Id: " + getId() + ","); if (getArn() != null) sb.append("Arn: " + getArn() + ","); if (getIdentityManagementType() != null) sb.append("IdentityManagementType: " + getIdentityManagementType() + ","); if (getInstanceAlias() != null) sb.append("InstanceAlias: " + getInstanceAlias() + ","); if (getCreatedTime() != null) sb.append("CreatedTime: " + getCreatedTime() + ","); if (getServiceRole() != null) sb.append("ServiceRole: " + getServiceRole() + ","); if (getInstanceStatus() != null) sb.append("InstanceStatus: " + getInstanceStatus() + ","); if (getInboundCallsEnabled() != null) sb.append("InboundCallsEnabled: " + getInboundCallsEnabled() + ","); if (getOutboundCallsEnabled() != null) sb.append("OutboundCallsEnabled: " + getOutboundCallsEnabled() + ","); if (getInstanceAccessUrl() != null) sb.append("InstanceAccessUrl: " + getInstanceAccessUrl()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getIdentityManagementType() == null) ? 0 : getIdentityManagementType() .hashCode()); hashCode = prime * hashCode + ((getInstanceAlias() == null) ? 0 : getInstanceAlias().hashCode()); hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode()); hashCode = prime * hashCode + ((getInstanceStatus() == null) ? 0 : getInstanceStatus().hashCode()); hashCode = prime * hashCode + ((getInboundCallsEnabled() == null) ? 0 : getInboundCallsEnabled().hashCode()); hashCode = prime * hashCode + ((getOutboundCallsEnabled() == null) ? 0 : getOutboundCallsEnabled().hashCode()); hashCode = prime * hashCode + ((getInstanceAccessUrl() == null) ? 0 : getInstanceAccessUrl().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceSummary == false) return false; InstanceSummary other = (InstanceSummary) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getIdentityManagementType() == null ^ this.getIdentityManagementType() == null) return false; if (other.getIdentityManagementType() != null && other.getIdentityManagementType().equals(this.getIdentityManagementType()) == false) return false; if (other.getInstanceAlias() == null ^ this.getInstanceAlias() == null) return false; if (other.getInstanceAlias() != null && other.getInstanceAlias().equals(this.getInstanceAlias()) == false) return false; if (other.getCreatedTime() == null ^ this.getCreatedTime() == null) return false; if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false) return false; if (other.getServiceRole() == null ^ this.getServiceRole() == null) return false; if (other.getServiceRole() != null && other.getServiceRole().equals(this.getServiceRole()) == false) return false; if (other.getInstanceStatus() == null ^ this.getInstanceStatus() == null) return false; if (other.getInstanceStatus() != null && other.getInstanceStatus().equals(this.getInstanceStatus()) == false) return false; if (other.getInboundCallsEnabled() == null ^ this.getInboundCallsEnabled() == null) return false; if (other.getInboundCallsEnabled() != null && other.getInboundCallsEnabled().equals(this.getInboundCallsEnabled()) == false) return false; if (other.getOutboundCallsEnabled() == null ^ this.getOutboundCallsEnabled() == null) return false; if (other.getOutboundCallsEnabled() != null && other.getOutboundCallsEnabled().equals(this.getOutboundCallsEnabled()) == false) return false; if (other.getInstanceAccessUrl() == null ^ this.getInstanceAccessUrl() == null) return false; if (other.getInstanceAccessUrl() != null && other.getInstanceAccessUrl().equals(this.getInstanceAccessUrl()) == false) return false; return true; } }