
com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package com.homeaway.digitalplatform.streamregistry;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class RegionStreamConfiguration extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -7500809067138909884L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"RegionStreamConfiguration\",\"namespace\":\"com.homeaway.digitalplatform.streamregistry\",\"fields\":[{\"name\":\"region\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* region\"},{\"name\":\"cluster\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* unique name of the cluster - corresponding to consul tag \\\"cluster\\\"\\n *\"},{\"name\":\"topics\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"doc\":\"* Topic names\"},{\"name\":\"streamConfiguration\",\"type\":[\"null\",{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}],\"doc\":\"* Properties related to Stream Configuration\",\"default\":null}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private static SpecificData MODEL$ = new SpecificData();
private static final BinaryMessageEncoder ENCODER =
new BinaryMessageEncoder(MODEL$, SCHEMA$);
private static final BinaryMessageDecoder DECODER =
new BinaryMessageDecoder(MODEL$, SCHEMA$);
/**
* Return the BinaryMessageDecoder instance used by this class.
*/
public static BinaryMessageDecoder getDecoder() {
return DECODER;
}
/**
* Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
* @param resolver a {@link SchemaStore} used to find schemas by fingerprint
*/
public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
}
/** Serializes this RegionStreamConfiguration to a ByteBuffer. */
public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
return ENCODER.encode(this);
}
/** Deserializes a RegionStreamConfiguration from a ByteBuffer. */
public static RegionStreamConfiguration fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
/** * region */
@Deprecated public java.lang.String region;
/** * unique name of the cluster - corresponding to consul tag "cluster"
* */
@Deprecated public java.lang.String cluster;
/** * Topic names */
@Deprecated public java.util.List topics;
/** * Properties related to Stream Configuration */
@Deprecated public java.util.Map streamConfiguration;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder()
.
*/
public RegionStreamConfiguration() {}
/**
* All-args constructor.
* @param region * region
* @param cluster * unique name of the cluster - corresponding to consul tag "cluster"
*
* @param topics * Topic names
* @param streamConfiguration * Properties related to Stream Configuration
*/
public RegionStreamConfiguration(java.lang.String region, java.lang.String cluster, java.util.List topics, java.util.Map streamConfiguration) {
this.region = region;
this.cluster = cluster;
this.topics = topics;
this.streamConfiguration = streamConfiguration;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return region;
case 1: return cluster;
case 2: return topics;
case 3: return streamConfiguration;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: region = (java.lang.String)value$; break;
case 1: cluster = (java.lang.String)value$; break;
case 2: topics = (java.util.List)value$; break;
case 3: streamConfiguration = (java.util.Map)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'region' field.
* @return * region
*/
public java.lang.String getRegion() {
return region;
}
/**
* Sets the value of the 'region' field.
* * region
* @param value the value to set.
*/
public void setRegion(java.lang.String value) {
this.region = value;
}
/**
* Gets the value of the 'cluster' field.
* @return * unique name of the cluster - corresponding to consul tag "cluster"
*
*/
public java.lang.String getCluster() {
return cluster;
}
/**
* Sets the value of the 'cluster' field.
* * unique name of the cluster - corresponding to consul tag "cluster"
*
* @param value the value to set.
*/
public void setCluster(java.lang.String value) {
this.cluster = value;
}
/**
* Gets the value of the 'topics' field.
* @return * Topic names
*/
public java.util.List getTopics() {
return topics;
}
/**
* Sets the value of the 'topics' field.
* * Topic names
* @param value the value to set.
*/
public void setTopics(java.util.List value) {
this.topics = value;
}
/**
* Gets the value of the 'streamConfiguration' field.
* @return * Properties related to Stream Configuration
*/
public java.util.Map getStreamConfiguration() {
return streamConfiguration;
}
/**
* Sets the value of the 'streamConfiguration' field.
* * Properties related to Stream Configuration
* @param value the value to set.
*/
public void setStreamConfiguration(java.util.Map value) {
this.streamConfiguration = value;
}
/**
* Creates a new RegionStreamConfiguration RecordBuilder.
* @return A new RegionStreamConfiguration RecordBuilder
*/
public static com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder newBuilder() {
return new com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder();
}
/**
* Creates a new RegionStreamConfiguration RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new RegionStreamConfiguration RecordBuilder
*/
public static com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder newBuilder(com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder other) {
return new com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder(other);
}
/**
* Creates a new RegionStreamConfiguration RecordBuilder by copying an existing RegionStreamConfiguration instance.
* @param other The existing instance to copy.
* @return A new RegionStreamConfiguration RecordBuilder
*/
public static com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder newBuilder(com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration other) {
return new com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder(other);
}
/**
* RecordBuilder for RegionStreamConfiguration instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
/** * region */
private java.lang.String region;
/** * unique name of the cluster - corresponding to consul tag "cluster"
* */
private java.lang.String cluster;
/** * Topic names */
private java.util.List topics;
/** * Properties related to Stream Configuration */
private java.util.Map streamConfiguration;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder other) {
super(other);
if (isValidValue(fields()[0], other.region)) {
this.region = data().deepCopy(fields()[0].schema(), other.region);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.cluster)) {
this.cluster = data().deepCopy(fields()[1].schema(), other.cluster);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.topics)) {
this.topics = data().deepCopy(fields()[2].schema(), other.topics);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.streamConfiguration)) {
this.streamConfiguration = data().deepCopy(fields()[3].schema(), other.streamConfiguration);
fieldSetFlags()[3] = true;
}
}
/**
* Creates a Builder by copying an existing RegionStreamConfiguration instance
* @param other The existing instance to copy.
*/
private Builder(com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.region)) {
this.region = data().deepCopy(fields()[0].schema(), other.region);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.cluster)) {
this.cluster = data().deepCopy(fields()[1].schema(), other.cluster);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.topics)) {
this.topics = data().deepCopy(fields()[2].schema(), other.topics);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.streamConfiguration)) {
this.streamConfiguration = data().deepCopy(fields()[3].schema(), other.streamConfiguration);
fieldSetFlags()[3] = true;
}
}
/**
* Gets the value of the 'region' field.
* * region
* @return The value.
*/
public java.lang.String getRegion() {
return region;
}
/**
* Sets the value of the 'region' field.
* * region
* @param value The value of 'region'.
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder setRegion(java.lang.String value) {
validate(fields()[0], value);
this.region = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'region' field has been set.
* * region
* @return True if the 'region' field has been set, false otherwise.
*/
public boolean hasRegion() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'region' field.
* * region
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder clearRegion() {
region = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'cluster' field.
* * unique name of the cluster - corresponding to consul tag "cluster"
*
* @return The value.
*/
public java.lang.String getCluster() {
return cluster;
}
/**
* Sets the value of the 'cluster' field.
* * unique name of the cluster - corresponding to consul tag "cluster"
*
* @param value The value of 'cluster'.
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder setCluster(java.lang.String value) {
validate(fields()[1], value);
this.cluster = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'cluster' field has been set.
* * unique name of the cluster - corresponding to consul tag "cluster"
*
* @return True if the 'cluster' field has been set, false otherwise.
*/
public boolean hasCluster() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'cluster' field.
* * unique name of the cluster - corresponding to consul tag "cluster"
*
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder clearCluster() {
cluster = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'topics' field.
* * Topic names
* @return The value.
*/
public java.util.List getTopics() {
return topics;
}
/**
* Sets the value of the 'topics' field.
* * Topic names
* @param value The value of 'topics'.
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder setTopics(java.util.List value) {
validate(fields()[2], value);
this.topics = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'topics' field has been set.
* * Topic names
* @return True if the 'topics' field has been set, false otherwise.
*/
public boolean hasTopics() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'topics' field.
* * Topic names
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder clearTopics() {
topics = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'streamConfiguration' field.
* * Properties related to Stream Configuration
* @return The value.
*/
public java.util.Map getStreamConfiguration() {
return streamConfiguration;
}
/**
* Sets the value of the 'streamConfiguration' field.
* * Properties related to Stream Configuration
* @param value The value of 'streamConfiguration'.
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder setStreamConfiguration(java.util.Map value) {
validate(fields()[3], value);
this.streamConfiguration = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'streamConfiguration' field has been set.
* * Properties related to Stream Configuration
* @return True if the 'streamConfiguration' field has been set, false otherwise.
*/
public boolean hasStreamConfiguration() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'streamConfiguration' field.
* * Properties related to Stream Configuration
* @return This builder.
*/
public com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration.Builder clearStreamConfiguration() {
streamConfiguration = null;
fieldSetFlags()[3] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public RegionStreamConfiguration build() {
try {
RegionStreamConfiguration record = new RegionStreamConfiguration();
record.region = fieldSetFlags()[0] ? this.region : (java.lang.String) defaultValue(fields()[0]);
record.cluster = fieldSetFlags()[1] ? this.cluster : (java.lang.String) defaultValue(fields()[1]);
record.topics = fieldSetFlags()[2] ? this.topics : (java.util.List) defaultValue(fields()[2]);
record.streamConfiguration = fieldSetFlags()[3] ? this.streamConfiguration : (java.util.Map) defaultValue(fields()[3]);
return record;
} catch (java.lang.Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumWriter
WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$);
@Override public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException {
WRITER$.write(this, SpecificData.getEncoder(out));
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumReader
READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$);
@Override public void readExternal(java.io.ObjectInput in)
throws java.io.IOException {
READER$.read(this, SpecificData.getDecoder(in));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy