All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.kafka.model.TopicReplication 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.kafka.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Details about topic replication. *

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

* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. *

*/ private Boolean copyAccessControlListsForTopics; /** *

* Whether to periodically configure remote topics to match their corresponding upstream topics. *

*/ private Boolean copyTopicConfigurations; /** *

* Whether to periodically check for new topics and partitions. *

*/ private Boolean detectAndCopyNewTopics; /** *

* Configuration for specifying the position in the topics to start replicating from. *

*/ private ReplicationStartingPosition startingPosition; /** *

* List of regular expression patterns indicating the topics that should not be replicated. *

*/ private java.util.List topicsToExclude; /** *

* List of regular expression patterns indicating the topics to copy. *

*/ private java.util.List topicsToReplicate; /** *

* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. *

* * @param copyAccessControlListsForTopics * Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. */ public void setCopyAccessControlListsForTopics(Boolean copyAccessControlListsForTopics) { this.copyAccessControlListsForTopics = copyAccessControlListsForTopics; } /** *

* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. *

* * @return Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. */ public Boolean getCopyAccessControlListsForTopics() { return this.copyAccessControlListsForTopics; } /** *

* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. *

* * @param copyAccessControlListsForTopics * Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withCopyAccessControlListsForTopics(Boolean copyAccessControlListsForTopics) { setCopyAccessControlListsForTopics(copyAccessControlListsForTopics); return this; } /** *

* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. *

* * @return Whether to periodically configure remote topic ACLs to match their corresponding upstream topics. */ public Boolean isCopyAccessControlListsForTopics() { return this.copyAccessControlListsForTopics; } /** *

* Whether to periodically configure remote topics to match their corresponding upstream topics. *

* * @param copyTopicConfigurations * Whether to periodically configure remote topics to match their corresponding upstream topics. */ public void setCopyTopicConfigurations(Boolean copyTopicConfigurations) { this.copyTopicConfigurations = copyTopicConfigurations; } /** *

* Whether to periodically configure remote topics to match their corresponding upstream topics. *

* * @return Whether to periodically configure remote topics to match their corresponding upstream topics. */ public Boolean getCopyTopicConfigurations() { return this.copyTopicConfigurations; } /** *

* Whether to periodically configure remote topics to match their corresponding upstream topics. *

* * @param copyTopicConfigurations * Whether to periodically configure remote topics to match their corresponding upstream topics. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withCopyTopicConfigurations(Boolean copyTopicConfigurations) { setCopyTopicConfigurations(copyTopicConfigurations); return this; } /** *

* Whether to periodically configure remote topics to match their corresponding upstream topics. *

* * @return Whether to periodically configure remote topics to match their corresponding upstream topics. */ public Boolean isCopyTopicConfigurations() { return this.copyTopicConfigurations; } /** *

* Whether to periodically check for new topics and partitions. *

* * @param detectAndCopyNewTopics * Whether to periodically check for new topics and partitions. */ public void setDetectAndCopyNewTopics(Boolean detectAndCopyNewTopics) { this.detectAndCopyNewTopics = detectAndCopyNewTopics; } /** *

* Whether to periodically check for new topics and partitions. *

* * @return Whether to periodically check for new topics and partitions. */ public Boolean getDetectAndCopyNewTopics() { return this.detectAndCopyNewTopics; } /** *

* Whether to periodically check for new topics and partitions. *

* * @param detectAndCopyNewTopics * Whether to periodically check for new topics and partitions. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withDetectAndCopyNewTopics(Boolean detectAndCopyNewTopics) { setDetectAndCopyNewTopics(detectAndCopyNewTopics); return this; } /** *

* Whether to periodically check for new topics and partitions. *

* * @return Whether to periodically check for new topics and partitions. */ public Boolean isDetectAndCopyNewTopics() { return this.detectAndCopyNewTopics; } /** *

* Configuration for specifying the position in the topics to start replicating from. *

* * @param startingPosition * Configuration for specifying the position in the topics to start replicating from. */ public void setStartingPosition(ReplicationStartingPosition startingPosition) { this.startingPosition = startingPosition; } /** *

* Configuration for specifying the position in the topics to start replicating from. *

* * @return Configuration for specifying the position in the topics to start replicating from. */ public ReplicationStartingPosition getStartingPosition() { return this.startingPosition; } /** *

* Configuration for specifying the position in the topics to start replicating from. *

* * @param startingPosition * Configuration for specifying the position in the topics to start replicating from. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withStartingPosition(ReplicationStartingPosition startingPosition) { setStartingPosition(startingPosition); return this; } /** *

* List of regular expression patterns indicating the topics that should not be replicated. *

* * @return List of regular expression patterns indicating the topics that should not be replicated. */ public java.util.List getTopicsToExclude() { return topicsToExclude; } /** *

* List of regular expression patterns indicating the topics that should not be replicated. *

* * @param topicsToExclude * List of regular expression patterns indicating the topics that should not be replicated. */ public void setTopicsToExclude(java.util.Collection topicsToExclude) { if (topicsToExclude == null) { this.topicsToExclude = null; return; } this.topicsToExclude = new java.util.ArrayList(topicsToExclude); } /** *

* List of regular expression patterns indicating the topics that should not be replicated. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTopicsToExclude(java.util.Collection)} or {@link #withTopicsToExclude(java.util.Collection)} if you * want to override the existing values. *

* * @param topicsToExclude * List of regular expression patterns indicating the topics that should not be replicated. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withTopicsToExclude(String... topicsToExclude) { if (this.topicsToExclude == null) { setTopicsToExclude(new java.util.ArrayList(topicsToExclude.length)); } for (String ele : topicsToExclude) { this.topicsToExclude.add(ele); } return this; } /** *

* List of regular expression patterns indicating the topics that should not be replicated. *

* * @param topicsToExclude * List of regular expression patterns indicating the topics that should not be replicated. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withTopicsToExclude(java.util.Collection topicsToExclude) { setTopicsToExclude(topicsToExclude); return this; } /** *

* List of regular expression patterns indicating the topics to copy. *

* * @return List of regular expression patterns indicating the topics to copy. */ public java.util.List getTopicsToReplicate() { return topicsToReplicate; } /** *

* List of regular expression patterns indicating the topics to copy. *

* * @param topicsToReplicate * List of regular expression patterns indicating the topics to copy. */ public void setTopicsToReplicate(java.util.Collection topicsToReplicate) { if (topicsToReplicate == null) { this.topicsToReplicate = null; return; } this.topicsToReplicate = new java.util.ArrayList(topicsToReplicate); } /** *

* List of regular expression patterns indicating the topics to copy. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTopicsToReplicate(java.util.Collection)} or {@link #withTopicsToReplicate(java.util.Collection)} if * you want to override the existing values. *

* * @param topicsToReplicate * List of regular expression patterns indicating the topics to copy. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withTopicsToReplicate(String... topicsToReplicate) { if (this.topicsToReplicate == null) { setTopicsToReplicate(new java.util.ArrayList(topicsToReplicate.length)); } for (String ele : topicsToReplicate) { this.topicsToReplicate.add(ele); } return this; } /** *

* List of regular expression patterns indicating the topics to copy. *

* * @param topicsToReplicate * List of regular expression patterns indicating the topics to copy. * @return Returns a reference to this object so that method calls can be chained together. */ public TopicReplication withTopicsToReplicate(java.util.Collection topicsToReplicate) { setTopicsToReplicate(topicsToReplicate); 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 (getCopyAccessControlListsForTopics() != null) sb.append("CopyAccessControlListsForTopics: ").append(getCopyAccessControlListsForTopics()).append(","); if (getCopyTopicConfigurations() != null) sb.append("CopyTopicConfigurations: ").append(getCopyTopicConfigurations()).append(","); if (getDetectAndCopyNewTopics() != null) sb.append("DetectAndCopyNewTopics: ").append(getDetectAndCopyNewTopics()).append(","); if (getStartingPosition() != null) sb.append("StartingPosition: ").append(getStartingPosition()).append(","); if (getTopicsToExclude() != null) sb.append("TopicsToExclude: ").append(getTopicsToExclude()).append(","); if (getTopicsToReplicate() != null) sb.append("TopicsToReplicate: ").append(getTopicsToReplicate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TopicReplication == false) return false; TopicReplication other = (TopicReplication) obj; if (other.getCopyAccessControlListsForTopics() == null ^ this.getCopyAccessControlListsForTopics() == null) return false; if (other.getCopyAccessControlListsForTopics() != null && other.getCopyAccessControlListsForTopics().equals(this.getCopyAccessControlListsForTopics()) == false) return false; if (other.getCopyTopicConfigurations() == null ^ this.getCopyTopicConfigurations() == null) return false; if (other.getCopyTopicConfigurations() != null && other.getCopyTopicConfigurations().equals(this.getCopyTopicConfigurations()) == false) return false; if (other.getDetectAndCopyNewTopics() == null ^ this.getDetectAndCopyNewTopics() == null) return false; if (other.getDetectAndCopyNewTopics() != null && other.getDetectAndCopyNewTopics().equals(this.getDetectAndCopyNewTopics()) == false) return false; if (other.getStartingPosition() == null ^ this.getStartingPosition() == null) return false; if (other.getStartingPosition() != null && other.getStartingPosition().equals(this.getStartingPosition()) == false) return false; if (other.getTopicsToExclude() == null ^ this.getTopicsToExclude() == null) return false; if (other.getTopicsToExclude() != null && other.getTopicsToExclude().equals(this.getTopicsToExclude()) == false) return false; if (other.getTopicsToReplicate() == null ^ this.getTopicsToReplicate() == null) return false; if (other.getTopicsToReplicate() != null && other.getTopicsToReplicate().equals(this.getTopicsToReplicate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCopyAccessControlListsForTopics() == null) ? 0 : getCopyAccessControlListsForTopics().hashCode()); hashCode = prime * hashCode + ((getCopyTopicConfigurations() == null) ? 0 : getCopyTopicConfigurations().hashCode()); hashCode = prime * hashCode + ((getDetectAndCopyNewTopics() == null) ? 0 : getDetectAndCopyNewTopics().hashCode()); hashCode = prime * hashCode + ((getStartingPosition() == null) ? 0 : getStartingPosition().hashCode()); hashCode = prime * hashCode + ((getTopicsToExclude() == null) ? 0 : getTopicsToExclude().hashCode()); hashCode = prime * hashCode + ((getTopicsToReplicate() == null) ? 0 : getTopicsToReplicate().hashCode()); return hashCode; } @Override public TopicReplication clone() { try { return (TopicReplication) 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.kafka.model.transform.TopicReplicationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy