/* * 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.elasticsearch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Options to configure endpoint for the Elasticsearch domain. *

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

* Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. *

*/ private Boolean enforceHTTPS; /** *

* Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: *

*

*/ private String tLSSecurityPolicy; /** *

* Specify if custom endpoint should be enabled for the Elasticsearch domain. *

*/ private Boolean customEndpointEnabled; /** *

* Specify the fully qualified domain for your custom endpoint. *

*/ private String customEndpoint; /** *

* Specify ACM certificate ARN for your custom endpoint. *

*/ private String customEndpointCertificateArn; /** *

* Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. *

* * @param enforceHTTPS * Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. */ public void setEnforceHTTPS(Boolean enforceHTTPS) { this.enforceHTTPS = enforceHTTPS; } /** *

* Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. *

* * @return Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. */ public Boolean getEnforceHTTPS() { return this.enforceHTTPS; } /** *

* Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. *

* * @param enforceHTTPS * Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. * @return Returns a reference to this object so that method calls can be chained together. */ public DomainEndpointOptions withEnforceHTTPS(Boolean enforceHTTPS) { setEnforceHTTPS(enforceHTTPS); return this; } /** *

* Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. *

* * @return Specify if only HTTPS endpoint should be enabled for the Elasticsearch domain. */ public Boolean isEnforceHTTPS() { return this.enforceHTTPS; } /** *

* Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: *

*

* * @param tLSSecurityPolicy * Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: * * @see TLSSecurityPolicy */ public void setTLSSecurityPolicy(String tLSSecurityPolicy) { this.tLSSecurityPolicy = tLSSecurityPolicy; } /** *

* Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: *

*

* * @return Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: * * @see TLSSecurityPolicy */ public String getTLSSecurityPolicy() { return this.tLSSecurityPolicy; } /** *

* Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: *

*

* * @param tLSSecurityPolicy * Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: * * @return Returns a reference to this object so that method calls can be chained together. * @see TLSSecurityPolicy */ public DomainEndpointOptions withTLSSecurityPolicy(String tLSSecurityPolicy) { setTLSSecurityPolicy(tLSSecurityPolicy); return this; } /** *

* Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: *

*

* * @param tLSSecurityPolicy * Specify the TLS security policy that needs to be applied to the HTTPS endpoint of Elasticsearch domain.
* It can be one of the following values: * * @return Returns a reference to this object so that method calls can be chained together. * @see TLSSecurityPolicy */ public DomainEndpointOptions withTLSSecurityPolicy(TLSSecurityPolicy tLSSecurityPolicy) { this.tLSSecurityPolicy = tLSSecurityPolicy.toString(); return this; } /** *

* Specify if custom endpoint should be enabled for the Elasticsearch domain. *

* * @param customEndpointEnabled * Specify if custom endpoint should be enabled for the Elasticsearch domain. */ public void setCustomEndpointEnabled(Boolean customEndpointEnabled) { this.customEndpointEnabled = customEndpointEnabled; } /** *

* Specify if custom endpoint should be enabled for the Elasticsearch domain. *

* * @return Specify if custom endpoint should be enabled for the Elasticsearch domain. */ public Boolean getCustomEndpointEnabled() { return this.customEndpointEnabled; } /** *

* Specify if custom endpoint should be enabled for the Elasticsearch domain. *

* * @param customEndpointEnabled * Specify if custom endpoint should be enabled for the Elasticsearch domain. * @return Returns a reference to this object so that method calls can be chained together. */ public DomainEndpointOptions withCustomEndpointEnabled(Boolean customEndpointEnabled) { setCustomEndpointEnabled(customEndpointEnabled); return this; } /** *

* Specify if custom endpoint should be enabled for the Elasticsearch domain. *

* * @return Specify if custom endpoint should be enabled for the Elasticsearch domain. */ public Boolean isCustomEndpointEnabled() { return this.customEndpointEnabled; } /** *

* Specify the fully qualified domain for your custom endpoint. *

* * @param customEndpoint * Specify the fully qualified domain for your custom endpoint. */ public void setCustomEndpoint(String customEndpoint) { this.customEndpoint = customEndpoint; } /** *

* Specify the fully qualified domain for your custom endpoint. *

* * @return Specify the fully qualified domain for your custom endpoint. */ public String getCustomEndpoint() { return this.customEndpoint; } /** *

* Specify the fully qualified domain for your custom endpoint. *

* * @param customEndpoint * Specify the fully qualified domain for your custom endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public DomainEndpointOptions withCustomEndpoint(String customEndpoint) { setCustomEndpoint(customEndpoint); return this; } /** *

* Specify ACM certificate ARN for your custom endpoint. *

* * @param customEndpointCertificateArn * Specify ACM certificate ARN for your custom endpoint. */ public void setCustomEndpointCertificateArn(String customEndpointCertificateArn) { this.customEndpointCertificateArn = customEndpointCertificateArn; } /** *

* Specify ACM certificate ARN for your custom endpoint. *

* * @return Specify ACM certificate ARN for your custom endpoint. */ public String getCustomEndpointCertificateArn() { return this.customEndpointCertificateArn; } /** *

* Specify ACM certificate ARN for your custom endpoint. *

* * @param customEndpointCertificateArn * Specify ACM certificate ARN for your custom endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public DomainEndpointOptions withCustomEndpointCertificateArn(String customEndpointCertificateArn) { setCustomEndpointCertificateArn(customEndpointCertificateArn); 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 (getEnforceHTTPS() != null) sb.append("EnforceHTTPS: ").append(getEnforceHTTPS()).append(","); if (getTLSSecurityPolicy() != null) sb.append("TLSSecurityPolicy: ").append(getTLSSecurityPolicy()).append(","); if (getCustomEndpointEnabled() != null) sb.append("CustomEndpointEnabled: ").append(getCustomEndpointEnabled()).append(","); if (getCustomEndpoint() != null) sb.append("CustomEndpoint: ").append(getCustomEndpoint()).append(","); if (getCustomEndpointCertificateArn() != null) sb.append("CustomEndpointCertificateArn: ").append(getCustomEndpointCertificateArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DomainEndpointOptions == false) return false; DomainEndpointOptions other = (DomainEndpointOptions) obj; if (other.getEnforceHTTPS() == null ^ this.getEnforceHTTPS() == null) return false; if (other.getEnforceHTTPS() != null && other.getEnforceHTTPS().equals(this.getEnforceHTTPS()) == false) return false; if (other.getTLSSecurityPolicy() == null ^ this.getTLSSecurityPolicy() == null) return false; if (other.getTLSSecurityPolicy() != null && other.getTLSSecurityPolicy().equals(this.getTLSSecurityPolicy()) == false) return false; if (other.getCustomEndpointEnabled() == null ^ this.getCustomEndpointEnabled() == null) return false; if (other.getCustomEndpointEnabled() != null && other.getCustomEndpointEnabled().equals(this.getCustomEndpointEnabled()) == false) return false; if (other.getCustomEndpoint() == null ^ this.getCustomEndpoint() == null) return false; if (other.getCustomEndpoint() != null && other.getCustomEndpoint().equals(this.getCustomEndpoint()) == false) return false; if (other.getCustomEndpointCertificateArn() == null ^ this.getCustomEndpointCertificateArn() == null) return false; if (other.getCustomEndpointCertificateArn() != null && other.getCustomEndpointCertificateArn().equals(this.getCustomEndpointCertificateArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnforceHTTPS() == null) ? 0 : getEnforceHTTPS().hashCode()); hashCode = prime * hashCode + ((getTLSSecurityPolicy() == null) ? 0 : getTLSSecurityPolicy().hashCode()); hashCode = prime * hashCode + ((getCustomEndpointEnabled() == null) ? 0 : getCustomEndpointEnabled().hashCode()); hashCode = prime * hashCode + ((getCustomEndpoint() == null) ? 0 : getCustomEndpoint().hashCode()); hashCode = prime * hashCode + ((getCustomEndpointCertificateArn() == null) ? 0 : getCustomEndpointCertificateArn().hashCode()); return hashCode; } @Override public DomainEndpointOptions clone() { try { return (DomainEndpointOptions) 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.elasticsearch.model.transform.DomainEndpointOptionsMarshaller.getInstance().marshall(this, protocolMarshaller); } }