/* * 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; import com.amazonaws.AmazonWebServiceRequest; /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Initiates an Amazon Connect instance with all the supported channels enabled. * It does not attach any storage, such as Amazon Simple Storage Service (Amazon * S3) or Amazon Kinesis. It also does not allow for any configurations on * features, such as Contact Lens for Amazon Connect. *

*

* Amazon Connect enforces a limit on the total number of instances that you can * create or delete in 30 days. If you exceed this limit, you will get an error * message indicating there has been an excessive number of attempts at creating * or deleting instances. You must wait 30 days before you can restart creating * and deleting instances in your account. *

*/ public class CreateInstanceRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The idempotency token. *

*

* Constraints:
* Length: - 500
*/ private String clientToken; /** *

* The type of identity management for your Amazon Connect users. *

*

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

* The name for your instance. *

*

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

* The identifier for the directory. *

*

* Constraints:
* Length: 12 - 12
* Pattern: ^d-[0-9a-f]{10}$
*/ private String directoryId; /** *

* Your contact center handles incoming contacts. *

*/ private Boolean inboundCallsEnabled; /** *

* Your contact center allows outbound calls. *

*/ private Boolean outboundCallsEnabled; /** *

* The idempotency token. *

*

* Constraints:
* Length: - 500
* * @return

* The idempotency token. *

*/ public String getClientToken() { return clientToken; } /** *

* The idempotency token. *

*

* Constraints:
* Length: - 500
* * @param clientToken

* The idempotency token. *

*/ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* The idempotency token. *

*

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

* Constraints:
* Length: - 500
* * @param clientToken

* The idempotency token. *

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

* The type of identity management for your Amazon Connect users. *

*

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

* The type of identity management for your Amazon Connect users. *

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

* The type of identity management for your Amazon Connect users. *

*

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

* The type of identity management for your Amazon Connect users. *

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

* The type of identity management for your Amazon Connect users. *

*

* 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 type of identity management for your Amazon Connect users. *

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

* The type of identity management for your Amazon Connect users. *

*

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

* The type of identity management for your Amazon Connect users. *

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

* The type of identity management for your Amazon Connect users. *

*

* 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 type of identity management for your Amazon Connect users. *

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

* The name for your instance. *

*

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

* The name for your instance. *

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

* The name for your instance. *

*

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

* The name for your instance. *

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

* The name for your 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 name for your instance. *

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

* The identifier for the directory. *

*

* Constraints:
* Length: 12 - 12
* Pattern: ^d-[0-9a-f]{10}$
* * @return

* The identifier for the directory. *

*/ public String getDirectoryId() { return directoryId; } /** *

* The identifier for the directory. *

*

* Constraints:
* Length: 12 - 12
* Pattern: ^d-[0-9a-f]{10}$
* * @param directoryId

* The identifier for the directory. *

*/ public void setDirectoryId(String directoryId) { this.directoryId = directoryId; } /** *

* The identifier for the directory. *

*

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

* Constraints:
* Length: 12 - 12
* Pattern: ^d-[0-9a-f]{10}$
* * @param directoryId

* The identifier for the directory. *

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

* Your contact center handles incoming contacts. *

* * @return

* Your contact center handles incoming contacts. *

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

* Your contact center handles incoming contacts. *

* * @return

* Your contact center handles incoming contacts. *

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

* Your contact center handles incoming contacts. *

* * @param inboundCallsEnabled

* Your contact center handles incoming contacts. *

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

* Your contact center handles incoming contacts. *

*

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

* Your contact center handles incoming contacts. *

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

* Your contact center allows outbound calls. *

* * @return

* Your contact center allows outbound calls. *

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

* Your contact center allows outbound calls. *

* * @return

* Your contact center allows outbound calls. *

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

* Your contact center allows outbound calls. *

* * @param outboundCallsEnabled

* Your contact center allows outbound calls. *

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

* Your contact center allows outbound calls. *

*

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

* Your contact center allows outbound calls. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateInstanceRequest withOutboundCallsEnabled(Boolean outboundCallsEnabled) { this.outboundCallsEnabled = outboundCallsEnabled; 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 (getClientToken() != null) sb.append("ClientToken: " + getClientToken() + ","); if (getIdentityManagementType() != null) sb.append("IdentityManagementType: " + getIdentityManagementType() + ","); if (getInstanceAlias() != null) sb.append("InstanceAlias: " + getInstanceAlias() + ","); if (getDirectoryId() != null) sb.append("DirectoryId: " + getDirectoryId() + ","); if (getInboundCallsEnabled() != null) sb.append("InboundCallsEnabled: " + getInboundCallsEnabled() + ","); if (getOutboundCallsEnabled() != null) sb.append("OutboundCallsEnabled: " + getOutboundCallsEnabled()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getIdentityManagementType() == null) ? 0 : getIdentityManagementType() .hashCode()); hashCode = prime * hashCode + ((getInstanceAlias() == null) ? 0 : getInstanceAlias().hashCode()); hashCode = prime * hashCode + ((getDirectoryId() == null) ? 0 : getDirectoryId().hashCode()); hashCode = prime * hashCode + ((getInboundCallsEnabled() == null) ? 0 : getInboundCallsEnabled().hashCode()); hashCode = prime * hashCode + ((getOutboundCallsEnabled() == null) ? 0 : getOutboundCallsEnabled().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateInstanceRequest == false) return false; CreateInstanceRequest other = (CreateInstanceRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == 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.getDirectoryId() == null ^ this.getDirectoryId() == null) return false; if (other.getDirectoryId() != null && other.getDirectoryId().equals(this.getDirectoryId()) == 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; return true; } }