/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.kaaproject.kaa.common.endpoint.gen;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class BasicEndpointProfile 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\":\"BasicEndpointProfile\",\"namespace\":\"org.kaaproject.kaa.common.endpoint.gen\",\"fields\":[{\"name\":\"profileBody\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
private java.lang.String profileBody;
/**
* 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 BasicEndpointProfile() {
}
/**
* All-args constructor.
*/
public BasicEndpointProfile(java.lang.String profileBody) {
this.profileBody = profileBody;
}
public static org.apache.avro.Schema getClassSchema() {
return SCHEMA$;
}
/**
* Creates a new BasicEndpointProfile RecordBuilder
*/
public static org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder newBuilder() {
return new org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder();
}
/**
* Creates a new BasicEndpointProfile RecordBuilder by copying an existing Builder
*/
public static org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder newBuilder(org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder other) {
return new org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder(other);
}
/**
* Creates a new BasicEndpointProfile RecordBuilder by copying an existing BasicEndpointProfile
* instance
*/
public static org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder newBuilder(org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile other) {
return new org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.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 profileBody;
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:
profileBody = (java.lang.String) value$;
break;
default:
throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'profileBody' field.
*/
public java.lang.String getProfileBody() {
return profileBody;
}
/**
* Sets the value of the 'profileBody' field.
*
* @param value the value to set.
*/
public void setProfileBody(java.lang.String value) {
this.profileBody = value;
}
/**
* RecordBuilder for BasicEndpointProfile instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<BasicEndpointProfile>
implements org.apache.avro.data.RecordBuilder<BasicEndpointProfile> {
private java.lang.String profileBody;
/**
* Creates a new Builder
*/
private Builder() {
super(org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder
*/
private Builder(org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder other) {
super(other);
if (isValidValue(fields()[0], other.profileBody)) {
this.profileBody = data().deepCopy(fields()[0].schema(), other.profileBody);
fieldSetFlags()[0] = true;
}
}
/**
* Creates a Builder by copying an existing BasicEndpointProfile instance
*/
private Builder(org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile other) {
super(org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.SCHEMA$);
if (isValidValue(fields()[0], other.profileBody)) {
this.profileBody = data().deepCopy(fields()[0].schema(), other.profileBody);
fieldSetFlags()[0] = true;
}
}
/**
* Gets the value of the 'profileBody' field
*/
public java.lang.String getProfileBody() {
return profileBody;
}
/**
* Sets the value of the 'profileBody' field
*/
public org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder setProfileBody(java.lang.String value) {
validate(fields()[0], value);
this.profileBody = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'profileBody' field has been set
*/
public boolean hasProfileBody() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'profileBody' field
*/
public org.kaaproject.kaa.common.endpoint.gen.BasicEndpointProfile.Builder clearProfileBody() {
profileBody = null;
fieldSetFlags()[0] = false;
return this;
}
@Override
public BasicEndpointProfile build() {
try {
BasicEndpointProfile record = new BasicEndpointProfile();
record.profileBody = fieldSetFlags()[0] ? this.profileBody : (java.lang.String) defaultValue(fields()[0]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}