/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.kaaproject.kaa.common.endpoint.gen;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class ExtendedEndpointProfileChild extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ExtendedEndpointProfileChild\",\"namespace\":\"org.kaaproject.kaa.common.endpoint.gen\",\"fields\":[{\"name\":\"otherSimpleField\",\"type\":\"int\"},{\"name\":\"stringField\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"otherMapSimpleField\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"}}]}");
private int otherSimpleField;
private java.lang.String stringField;
private java.util.Map<java.lang.String, java.lang.Long> otherMapSimpleField;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use {@link \#newBuilder()}.
*/
public ExtendedEndpointProfileChild() {
}
/**
* All-args constructor.
*/
public ExtendedEndpointProfileChild(java.lang.Integer otherSimpleField, java.lang.String stringField, java.util.Map<java.lang.String, java.lang.Long> otherMapSimpleField) {
this.otherSimpleField = otherSimpleField;
this.stringField = stringField;
this.otherMapSimpleField = otherMapSimpleField;
}
public static org.apache.avro.Schema getClassSchema() {
return SCHEMA$;
}
/**
* Creates a new ExtendedEndpointProfileChild RecordBuilder
*/
public static org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder newBuilder() {
return new org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder();
}
/**
* Creates a new ExtendedEndpointProfileChild RecordBuilder by copying an existing Builder
*/
public static org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder newBuilder(org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder other) {
return new org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder(other);
}
/**
* Creates a new ExtendedEndpointProfileChild RecordBuilder by copying an existing
* ExtendedEndpointProfileChild instance
*/
public static org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder newBuilder(org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild other) {
return new org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder(other);
}
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 otherSimpleField;
case 1:
return stringField;
case 2:
return otherMapSimpleField;
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:
otherSimpleField = (java.lang.Integer) value$;
break;
case 1:
stringField = (java.lang.String) value$;
break;
case 2:
otherMapSimpleField = (java.util.Map<java.lang.String, java.lang.Long>) value$;
break;
default:
throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'otherSimpleField' field.
*/
public java.lang.Integer getOtherSimpleField() {
return otherSimpleField;
}
/**
* Sets the value of the 'otherSimpleField' field.
*
* @param value the value to set.
*/
public void setOtherSimpleField(java.lang.Integer value) {
this.otherSimpleField = value;
}
/**
* Gets the value of the 'stringField' field.
*/
public java.lang.String getStringField() {
return stringField;
}
/**
* Sets the value of the 'stringField' field.
*
* @param value the value to set.
*/
public void setStringField(java.lang.String value) {
this.stringField = value;
}
/**
* Gets the value of the 'otherMapSimpleField' field.
*/
public java.util.Map<java.lang.String, java.lang.Long> getOtherMapSimpleField() {
return otherMapSimpleField;
}
/**
* Sets the value of the 'otherMapSimpleField' field.
*
* @param value the value to set.
*/
public void setOtherMapSimpleField(java.util.Map<java.lang.String, java.lang.Long> value) {
this.otherMapSimpleField = value;
}
/**
* RecordBuilder for ExtendedEndpointProfileChild instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ExtendedEndpointProfileChild>
implements org.apache.avro.data.RecordBuilder<ExtendedEndpointProfileChild> {
private int otherSimpleField;
private java.lang.String stringField;
private java.util.Map<java.lang.String, java.lang.Long> otherMapSimpleField;
/**
* Creates a new Builder
*/
private Builder() {
super(org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder
*/
private Builder(org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder other) {
super(other);
if (isValidValue(fields()[0], other.otherSimpleField)) {
this.otherSimpleField = data().deepCopy(fields()[0].schema(), other.otherSimpleField);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.stringField)) {
this.stringField = data().deepCopy(fields()[1].schema(), other.stringField);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.otherMapSimpleField)) {
this.otherMapSimpleField = data().deepCopy(fields()[2].schema(), other.otherMapSimpleField);
fieldSetFlags()[2] = true;
}
}
/**
* Creates a Builder by copying an existing ExtendedEndpointProfileChild instance
*/
private Builder(org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild other) {
super(org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.SCHEMA$);
if (isValidValue(fields()[0], other.otherSimpleField)) {
this.otherSimpleField = data().deepCopy(fields()[0].schema(), other.otherSimpleField);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.stringField)) {
this.stringField = data().deepCopy(fields()[1].schema(), other.stringField);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.otherMapSimpleField)) {
this.otherMapSimpleField = data().deepCopy(fields()[2].schema(), other.otherMapSimpleField);
fieldSetFlags()[2] = true;
}
}
/**
* Gets the value of the 'otherSimpleField' field
*/
public java.lang.Integer getOtherSimpleField() {
return otherSimpleField;
}
/**
* Sets the value of the 'otherSimpleField' field
*/
public org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder setOtherSimpleField(int value) {
validate(fields()[0], value);
this.otherSimpleField = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'otherSimpleField' field has been set
*/
public boolean hasOtherSimpleField() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'otherSimpleField' field
*/
public org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder clearOtherSimpleField() {
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'stringField' field
*/
public java.lang.String getStringField() {
return stringField;
}
/**
* Sets the value of the 'stringField' field
*/
public org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder setStringField(java.lang.String value) {
validate(fields()[1], value);
this.stringField = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'stringField' field has been set
*/
public boolean hasStringField() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'stringField' field
*/
public org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder clearStringField() {
stringField = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'otherMapSimpleField' field
*/
public java.util.Map<java.lang.String, java.lang.Long> getOtherMapSimpleField() {
return otherMapSimpleField;
}
/**
* Sets the value of the 'otherMapSimpleField' field
*/
public org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder setOtherMapSimpleField(java.util.Map<java.lang.String, java.lang.Long> value) {
validate(fields()[2], value);
this.otherMapSimpleField = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'otherMapSimpleField' field has been set
*/
public boolean hasOtherMapSimpleField() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'otherMapSimpleField' field
*/
public org.kaaproject.kaa.common.endpoint.gen.ExtendedEndpointProfileChild.Builder clearOtherMapSimpleField() {
otherMapSimpleField = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public ExtendedEndpointProfileChild build() {
try {
ExtendedEndpointProfileChild record = new ExtendedEndpointProfileChild();
record.otherSimpleField = fieldSetFlags()[0] ? this.otherSimpleField : (java.lang.Integer) defaultValue(fields()[0]);
record.stringField = fieldSetFlags()[1] ? this.stringField : (java.lang.String) defaultValue(fields()[1]);
record.otherMapSimpleField = fieldSetFlags()[2] ? this.otherMapSimpleField : (java.util.Map<java.lang.String, java.lang.Long>) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}