com.amazonaws.services.databasemigrationservice.model.ElasticsearchSettings Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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.databasemigrationservice.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides information that defines an OpenSearch endpoint.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ElasticsearchSettings implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
*
*/
private String serviceAccessRoleArn;
/**
*
* The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not specified.
*
*/
private String endpointUri;
/**
*
* The maximum percentage of records that can fail to be written before a full load operation stops.
*
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch also has
* the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer of all records
* fail in the last 10 minutes, the full load operation stops.
*
*/
private Integer fullLoadErrorPercentage;
/**
*
* The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
*
*/
private Integer errorRetryDuration;
/**
*
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in versions
* 7. x and later. The default value is false
.
*
*/
private Boolean useNewMappingType;
/**
*
* The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
*
*
* @param serviceAccessRoleArn
* The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
*/
public void setServiceAccessRoleArn(String serviceAccessRoleArn) {
this.serviceAccessRoleArn = serviceAccessRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
*
*
* @return The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
*/
public String getServiceAccessRoleArn() {
return this.serviceAccessRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
*
*
* @param serviceAccessRoleArn
* The Amazon Resource Name (ARN) used by the service to access the IAM role. The role must allow the
* iam:PassRole
action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticsearchSettings withServiceAccessRoleArn(String serviceAccessRoleArn) {
setServiceAccessRoleArn(serviceAccessRoleArn);
return this;
}
/**
*
* The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not specified.
*
*
* @param endpointUri
* The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not
* specified.
*/
public void setEndpointUri(String endpointUri) {
this.endpointUri = endpointUri;
}
/**
*
* The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not specified.
*
*
* @return The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not
* specified.
*/
public String getEndpointUri() {
return this.endpointUri;
}
/**
*
* The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not specified.
*
*
* @param endpointUri
* The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport protocol (http/https) is not
* specified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticsearchSettings withEndpointUri(String endpointUri) {
setEndpointUri(endpointUri);
return this;
}
/**
*
* The maximum percentage of records that can fail to be written before a full load operation stops.
*
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch also has
* the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer of all records
* fail in the last 10 minutes, the full load operation stops.
*
*
* @param fullLoadErrorPercentage
* The maximum percentage of records that can fail to be written before a full load operation stops.
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch also
* has the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer of
* all records fail in the last 10 minutes, the full load operation stops.
*/
public void setFullLoadErrorPercentage(Integer fullLoadErrorPercentage) {
this.fullLoadErrorPercentage = fullLoadErrorPercentage;
}
/**
*
* The maximum percentage of records that can fail to be written before a full load operation stops.
*
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch also has
* the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer of all records
* fail in the last 10 minutes, the full load operation stops.
*
*
* @return The maximum percentage of records that can fail to be written before a full load operation stops.
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch
* also has the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer
* of all records fail in the last 10 minutes, the full load operation stops.
*/
public Integer getFullLoadErrorPercentage() {
return this.fullLoadErrorPercentage;
}
/**
*
* The maximum percentage of records that can fail to be written before a full load operation stops.
*
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch also has
* the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer of all records
* fail in the last 10 minutes, the full load operation stops.
*
*
* @param fullLoadErrorPercentage
* The maximum percentage of records that can fail to be written before a full load operation stops.
*
* To avoid early failure, this counter is only effective after 1000 records are transferred. OpenSearch also
* has the concept of error monitoring during the last 10 minutes of an Observation Window. If transfer of
* all records fail in the last 10 minutes, the full load operation stops.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticsearchSettings withFullLoadErrorPercentage(Integer fullLoadErrorPercentage) {
setFullLoadErrorPercentage(fullLoadErrorPercentage);
return this;
}
/**
*
* The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
*
*
* @param errorRetryDuration
* The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
*/
public void setErrorRetryDuration(Integer errorRetryDuration) {
this.errorRetryDuration = errorRetryDuration;
}
/**
*
* The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
*
*
* @return The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
*/
public Integer getErrorRetryDuration() {
return this.errorRetryDuration;
}
/**
*
* The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
*
*
* @param errorRetryDuration
* The maximum number of seconds for which DMS retries failed API requests to the OpenSearch cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticsearchSettings withErrorRetryDuration(Integer errorRetryDuration) {
setErrorRetryDuration(errorRetryDuration);
return this;
}
/**
*
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in versions
* 7. x and later. The default value is false
.
*
*
* @param useNewMappingType
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in
* versions 7. x and later. The default value is false
.
*/
public void setUseNewMappingType(Boolean useNewMappingType) {
this.useNewMappingType = useNewMappingType;
}
/**
*
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in versions
* 7. x and later. The default value is false
.
*
*
* @return Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in
* versions 7. x and later. The default value is false
.
*/
public Boolean getUseNewMappingType() {
return this.useNewMappingType;
}
/**
*
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in versions
* 7. x and later. The default value is false
.
*
*
* @param useNewMappingType
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in
* versions 7. x and later. The default value is false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticsearchSettings withUseNewMappingType(Boolean useNewMappingType) {
setUseNewMappingType(useNewMappingType);
return this;
}
/**
*
* Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in versions
* 7. x and later. The default value is false
.
*
*
* @return Set this option to true
for DMS to migrate documentation using the documentation type
* _doc
. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in
* versions 7. x and later. The default value is false
.
*/
public Boolean isUseNewMappingType() {
return this.useNewMappingType;
}
/**
* 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 (getServiceAccessRoleArn() != null)
sb.append("ServiceAccessRoleArn: ").append(getServiceAccessRoleArn()).append(",");
if (getEndpointUri() != null)
sb.append("EndpointUri: ").append(getEndpointUri()).append(",");
if (getFullLoadErrorPercentage() != null)
sb.append("FullLoadErrorPercentage: ").append(getFullLoadErrorPercentage()).append(",");
if (getErrorRetryDuration() != null)
sb.append("ErrorRetryDuration: ").append(getErrorRetryDuration()).append(",");
if (getUseNewMappingType() != null)
sb.append("UseNewMappingType: ").append(getUseNewMappingType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ElasticsearchSettings == false)
return false;
ElasticsearchSettings other = (ElasticsearchSettings) obj;
if (other.getServiceAccessRoleArn() == null ^ this.getServiceAccessRoleArn() == null)
return false;
if (other.getServiceAccessRoleArn() != null && other.getServiceAccessRoleArn().equals(this.getServiceAccessRoleArn()) == false)
return false;
if (other.getEndpointUri() == null ^ this.getEndpointUri() == null)
return false;
if (other.getEndpointUri() != null && other.getEndpointUri().equals(this.getEndpointUri()) == false)
return false;
if (other.getFullLoadErrorPercentage() == null ^ this.getFullLoadErrorPercentage() == null)
return false;
if (other.getFullLoadErrorPercentage() != null && other.getFullLoadErrorPercentage().equals(this.getFullLoadErrorPercentage()) == false)
return false;
if (other.getErrorRetryDuration() == null ^ this.getErrorRetryDuration() == null)
return false;
if (other.getErrorRetryDuration() != null && other.getErrorRetryDuration().equals(this.getErrorRetryDuration()) == false)
return false;
if (other.getUseNewMappingType() == null ^ this.getUseNewMappingType() == null)
return false;
if (other.getUseNewMappingType() != null && other.getUseNewMappingType().equals(this.getUseNewMappingType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServiceAccessRoleArn() == null) ? 0 : getServiceAccessRoleArn().hashCode());
hashCode = prime * hashCode + ((getEndpointUri() == null) ? 0 : getEndpointUri().hashCode());
hashCode = prime * hashCode + ((getFullLoadErrorPercentage() == null) ? 0 : getFullLoadErrorPercentage().hashCode());
hashCode = prime * hashCode + ((getErrorRetryDuration() == null) ? 0 : getErrorRetryDuration().hashCode());
hashCode = prime * hashCode + ((getUseNewMappingType() == null) ? 0 : getUseNewMappingType().hashCode());
return hashCode;
}
@Override
public ElasticsearchSettings clone() {
try {
return (ElasticsearchSettings) 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.databasemigrationservice.model.transform.ElasticsearchSettingsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}