/* * Copyright 2012-2017 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.kinesisfirehose.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * The destination description in Amazon ES. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ElasticsearchDestinationDescription" * target="_top">AWS API Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ElasticsearchDestinationDescription implements Serializable, Cloneable, StructuredPojo { /** * <p> * The ARN of the AWS credentials. * </p> */ private String roleARN; /** * <p> * The ARN of the Amazon ES domain. * </p> */ private String domainARN; /** * <p> * The Elasticsearch index name. * </p> */ private String indexName; /** * <p> * The Elasticsearch type name. * </p> */ private String typeName; /** * <p> * The Elasticsearch index rotation period * </p> */ private String indexRotationPeriod; /** * <p> * The buffering options. * </p> */ private ElasticsearchBufferingHints bufferingHints; /** * <p> * The Amazon ES retry options. * </p> */ private ElasticsearchRetryOptions retryOptions; /** * <p> * The Amazon S3 backup mode. * </p> */ private String s3BackupMode; /** * <p> * The Amazon S3 destination. * </p> */ private S3DestinationDescription s3DestinationDescription; /** * <p> * The data processing configuration. * </p> */ private ProcessingConfiguration processingConfiguration; /** * <p> * The CloudWatch logging options. * </p> */ private CloudWatchLoggingOptions cloudWatchLoggingOptions; /** * <p> * The ARN of the AWS credentials. * </p> * * @param roleARN * The ARN of the AWS credentials. */ public void setRoleARN(String roleARN) { this.roleARN = roleARN; } /** * <p> * The ARN of the AWS credentials. * </p> * * @return The ARN of the AWS credentials. */ public String getRoleARN() { return this.roleARN; } /** * <p> * The ARN of the AWS credentials. * </p> * * @param roleARN * The ARN of the AWS credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withRoleARN(String roleARN) { setRoleARN(roleARN); return this; } /** * <p> * The ARN of the Amazon ES domain. * </p> * * @param domainARN * The ARN of the Amazon ES domain. */ public void setDomainARN(String domainARN) { this.domainARN = domainARN; } /** * <p> * The ARN of the Amazon ES domain. * </p> * * @return The ARN of the Amazon ES domain. */ public String getDomainARN() { return this.domainARN; } /** * <p> * The ARN of the Amazon ES domain. * </p> * * @param domainARN * The ARN of the Amazon ES domain. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withDomainARN(String domainARN) { setDomainARN(domainARN); return this; } /** * <p> * The Elasticsearch index name. * </p> * * @param indexName * The Elasticsearch index name. */ public void setIndexName(String indexName) { this.indexName = indexName; } /** * <p> * The Elasticsearch index name. * </p> * * @return The Elasticsearch index name. */ public String getIndexName() { return this.indexName; } /** * <p> * The Elasticsearch index name. * </p> * * @param indexName * The Elasticsearch index name. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withIndexName(String indexName) { setIndexName(indexName); return this; } /** * <p> * The Elasticsearch type name. * </p> * * @param typeName * The Elasticsearch type name. */ public void setTypeName(String typeName) { this.typeName = typeName; } /** * <p> * The Elasticsearch type name. * </p> * * @return The Elasticsearch type name. */ public String getTypeName() { return this.typeName; } /** * <p> * The Elasticsearch type name. * </p> * * @param typeName * The Elasticsearch type name. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withTypeName(String typeName) { setTypeName(typeName); return this; } /** * <p> * The Elasticsearch index rotation period * </p> * * @param indexRotationPeriod * The Elasticsearch index rotation period * @see ElasticsearchIndexRotationPeriod */ public void setIndexRotationPeriod(String indexRotationPeriod) { this.indexRotationPeriod = indexRotationPeriod; } /** * <p> * The Elasticsearch index rotation period * </p> * * @return The Elasticsearch index rotation period * @see ElasticsearchIndexRotationPeriod */ public String getIndexRotationPeriod() { return this.indexRotationPeriod; } /** * <p> * The Elasticsearch index rotation period * </p> * * @param indexRotationPeriod * The Elasticsearch index rotation period * @return Returns a reference to this object so that method calls can be chained together. * @see ElasticsearchIndexRotationPeriod */ public ElasticsearchDestinationDescription withIndexRotationPeriod(String indexRotationPeriod) { setIndexRotationPeriod(indexRotationPeriod); return this; } /** * <p> * The Elasticsearch index rotation period * </p> * * @param indexRotationPeriod * The Elasticsearch index rotation period * @see ElasticsearchIndexRotationPeriod */ public void setIndexRotationPeriod(ElasticsearchIndexRotationPeriod indexRotationPeriod) { this.indexRotationPeriod = indexRotationPeriod.toString(); } /** * <p> * The Elasticsearch index rotation period * </p> * * @param indexRotationPeriod * The Elasticsearch index rotation period * @return Returns a reference to this object so that method calls can be chained together. * @see ElasticsearchIndexRotationPeriod */ public ElasticsearchDestinationDescription withIndexRotationPeriod(ElasticsearchIndexRotationPeriod indexRotationPeriod) { setIndexRotationPeriod(indexRotationPeriod); return this; } /** * <p> * The buffering options. * </p> * * @param bufferingHints * The buffering options. */ public void setBufferingHints(ElasticsearchBufferingHints bufferingHints) { this.bufferingHints = bufferingHints; } /** * <p> * The buffering options. * </p> * * @return The buffering options. */ public ElasticsearchBufferingHints getBufferingHints() { return this.bufferingHints; } /** * <p> * The buffering options. * </p> * * @param bufferingHints * The buffering options. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withBufferingHints(ElasticsearchBufferingHints bufferingHints) { setBufferingHints(bufferingHints); return this; } /** * <p> * The Amazon ES retry options. * </p> * * @param retryOptions * The Amazon ES retry options. */ public void setRetryOptions(ElasticsearchRetryOptions retryOptions) { this.retryOptions = retryOptions; } /** * <p> * The Amazon ES retry options. * </p> * * @return The Amazon ES retry options. */ public ElasticsearchRetryOptions getRetryOptions() { return this.retryOptions; } /** * <p> * The Amazon ES retry options. * </p> * * @param retryOptions * The Amazon ES retry options. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withRetryOptions(ElasticsearchRetryOptions retryOptions) { setRetryOptions(retryOptions); return this; } /** * <p> * The Amazon S3 backup mode. * </p> * * @param s3BackupMode * The Amazon S3 backup mode. * @see ElasticsearchS3BackupMode */ public void setS3BackupMode(String s3BackupMode) { this.s3BackupMode = s3BackupMode; } /** * <p> * The Amazon S3 backup mode. * </p> * * @return The Amazon S3 backup mode. * @see ElasticsearchS3BackupMode */ public String getS3BackupMode() { return this.s3BackupMode; } /** * <p> * The Amazon S3 backup mode. * </p> * * @param s3BackupMode * The Amazon S3 backup mode. * @return Returns a reference to this object so that method calls can be chained together. * @see ElasticsearchS3BackupMode */ public ElasticsearchDestinationDescription withS3BackupMode(String s3BackupMode) { setS3BackupMode(s3BackupMode); return this; } /** * <p> * The Amazon S3 backup mode. * </p> * * @param s3BackupMode * The Amazon S3 backup mode. * @see ElasticsearchS3BackupMode */ public void setS3BackupMode(ElasticsearchS3BackupMode s3BackupMode) { this.s3BackupMode = s3BackupMode.toString(); } /** * <p> * The Amazon S3 backup mode. * </p> * * @param s3BackupMode * The Amazon S3 backup mode. * @return Returns a reference to this object so that method calls can be chained together. * @see ElasticsearchS3BackupMode */ public ElasticsearchDestinationDescription withS3BackupMode(ElasticsearchS3BackupMode s3BackupMode) { setS3BackupMode(s3BackupMode); return this; } /** * <p> * The Amazon S3 destination. * </p> * * @param s3DestinationDescription * The Amazon S3 destination. */ public void setS3DestinationDescription(S3DestinationDescription s3DestinationDescription) { this.s3DestinationDescription = s3DestinationDescription; } /** * <p> * The Amazon S3 destination. * </p> * * @return The Amazon S3 destination. */ public S3DestinationDescription getS3DestinationDescription() { return this.s3DestinationDescription; } /** * <p> * The Amazon S3 destination. * </p> * * @param s3DestinationDescription * The Amazon S3 destination. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withS3DestinationDescription(S3DestinationDescription s3DestinationDescription) { setS3DestinationDescription(s3DestinationDescription); return this; } /** * <p> * The data processing configuration. * </p> * * @param processingConfiguration * The data processing configuration. */ public void setProcessingConfiguration(ProcessingConfiguration processingConfiguration) { this.processingConfiguration = processingConfiguration; } /** * <p> * The data processing configuration. * </p> * * @return The data processing configuration. */ public ProcessingConfiguration getProcessingConfiguration() { return this.processingConfiguration; } /** * <p> * The data processing configuration. * </p> * * @param processingConfiguration * The data processing configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withProcessingConfiguration(ProcessingConfiguration processingConfiguration) { setProcessingConfiguration(processingConfiguration); return this; } /** * <p> * The CloudWatch logging options. * </p> * * @param cloudWatchLoggingOptions * The CloudWatch logging options. */ public void setCloudWatchLoggingOptions(CloudWatchLoggingOptions cloudWatchLoggingOptions) { this.cloudWatchLoggingOptions = cloudWatchLoggingOptions; } /** * <p> * The CloudWatch logging options. * </p> * * @return The CloudWatch logging options. */ public CloudWatchLoggingOptions getCloudWatchLoggingOptions() { return this.cloudWatchLoggingOptions; } /** * <p> * The CloudWatch logging options. * </p> * * @param cloudWatchLoggingOptions * The CloudWatch logging options. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchDestinationDescription withCloudWatchLoggingOptions(CloudWatchLoggingOptions cloudWatchLoggingOptions) { setCloudWatchLoggingOptions(cloudWatchLoggingOptions); 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 (getRoleARN() != null) sb.append("RoleARN: ").append(getRoleARN()).append(","); if (getDomainARN() != null) sb.append("DomainARN: ").append(getDomainARN()).append(","); if (getIndexName() != null) sb.append("IndexName: ").append(getIndexName()).append(","); if (getTypeName() != null) sb.append("TypeName: ").append(getTypeName()).append(","); if (getIndexRotationPeriod() != null) sb.append("IndexRotationPeriod: ").append(getIndexRotationPeriod()).append(","); if (getBufferingHints() != null) sb.append("BufferingHints: ").append(getBufferingHints()).append(","); if (getRetryOptions() != null) sb.append("RetryOptions: ").append(getRetryOptions()).append(","); if (getS3BackupMode() != null) sb.append("S3BackupMode: ").append(getS3BackupMode()).append(","); if (getS3DestinationDescription() != null) sb.append("S3DestinationDescription: ").append(getS3DestinationDescription()).append(","); if (getProcessingConfiguration() != null) sb.append("ProcessingConfiguration: ").append(getProcessingConfiguration()).append(","); if (getCloudWatchLoggingOptions() != null) sb.append("CloudWatchLoggingOptions: ").append(getCloudWatchLoggingOptions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ElasticsearchDestinationDescription == false) return false; ElasticsearchDestinationDescription other = (ElasticsearchDestinationDescription) obj; if (other.getRoleARN() == null ^ this.getRoleARN() == null) return false; if (other.getRoleARN() != null && other.getRoleARN().equals(this.getRoleARN()) == false) return false; if (other.getDomainARN() == null ^ this.getDomainARN() == null) return false; if (other.getDomainARN() != null && other.getDomainARN().equals(this.getDomainARN()) == false) return false; if (other.getIndexName() == null ^ this.getIndexName() == null) return false; if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false) return false; if (other.getTypeName() == null ^ this.getTypeName() == null) return false; if (other.getTypeName() != null && other.getTypeName().equals(this.getTypeName()) == false) return false; if (other.getIndexRotationPeriod() == null ^ this.getIndexRotationPeriod() == null) return false; if (other.getIndexRotationPeriod() != null && other.getIndexRotationPeriod().equals(this.getIndexRotationPeriod()) == false) return false; if (other.getBufferingHints() == null ^ this.getBufferingHints() == null) return false; if (other.getBufferingHints() != null && other.getBufferingHints().equals(this.getBufferingHints()) == false) return false; if (other.getRetryOptions() == null ^ this.getRetryOptions() == null) return false; if (other.getRetryOptions() != null && other.getRetryOptions().equals(this.getRetryOptions()) == false) return false; if (other.getS3BackupMode() == null ^ this.getS3BackupMode() == null) return false; if (other.getS3BackupMode() != null && other.getS3BackupMode().equals(this.getS3BackupMode()) == false) return false; if (other.getS3DestinationDescription() == null ^ this.getS3DestinationDescription() == null) return false; if (other.getS3DestinationDescription() != null && other.getS3DestinationDescription().equals(this.getS3DestinationDescription()) == false) return false; if (other.getProcessingConfiguration() == null ^ this.getProcessingConfiguration() == null) return false; if (other.getProcessingConfiguration() != null && other.getProcessingConfiguration().equals(this.getProcessingConfiguration()) == false) return false; if (other.getCloudWatchLoggingOptions() == null ^ this.getCloudWatchLoggingOptions() == null) return false; if (other.getCloudWatchLoggingOptions() != null && other.getCloudWatchLoggingOptions().equals(this.getCloudWatchLoggingOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode()); hashCode = prime * hashCode + ((getDomainARN() == null) ? 0 : getDomainARN().hashCode()); hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode()); hashCode = prime * hashCode + ((getTypeName() == null) ? 0 : getTypeName().hashCode()); hashCode = prime * hashCode + ((getIndexRotationPeriod() == null) ? 0 : getIndexRotationPeriod().hashCode()); hashCode = prime * hashCode + ((getBufferingHints() == null) ? 0 : getBufferingHints().hashCode()); hashCode = prime * hashCode + ((getRetryOptions() == null) ? 0 : getRetryOptions().hashCode()); hashCode = prime * hashCode + ((getS3BackupMode() == null) ? 0 : getS3BackupMode().hashCode()); hashCode = prime * hashCode + ((getS3DestinationDescription() == null) ? 0 : getS3DestinationDescription().hashCode()); hashCode = prime * hashCode + ((getProcessingConfiguration() == null) ? 0 : getProcessingConfiguration().hashCode()); hashCode = prime * hashCode + ((getCloudWatchLoggingOptions() == null) ? 0 : getCloudWatchLoggingOptions().hashCode()); return hashCode; } @Override public ElasticsearchDestinationDescription clone() { try { return (ElasticsearchDestinationDescription) 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.kinesisfirehose.model.transform.ElasticsearchDestinationDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } }