/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package org.kaaproject.kaa.server.plugin.rest.gen; @SuppressWarnings("all") @org.apache.avro.specific.AvroGenerated public class KaaRestPluginConfigSchema 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\":\"KaaRestPluginConfigSchema\",\"namespace\":\"org.kaaproject.kaa.server.plugin.rest.gen\",\"fields\":[{\"name\":\"host\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"port\",\"type\":\"int\"},{\"name\":\"httpSchema\",\"type\":{\"type\":\"enum\",\"name\":\"HttpSchemaType\",\"symbols\":[\"HTTP\",\"HTTPS\"]},\"displayName\":\"Http schema\",\"by_default\":\"HTTP\"},{\"name\":\"keyStoreFileName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"keyStorePass\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}"); private java.lang.String host; private int port; private org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType httpSchema; private java.lang.String keyStoreFileName; private java.lang.String keyStorePass; /** * 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 KaaRestPluginConfigSchema() { } /** * All-args constructor. */ public KaaRestPluginConfigSchema(java.lang.String host, java.lang.Integer port, org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType httpSchema, java.lang.String keyStoreFileName, java.lang.String keyStorePass) { this.host = host; this.port = port; this.httpSchema = httpSchema; this.keyStoreFileName = keyStoreFileName; this.keyStorePass = keyStorePass; } public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } /** * Creates a new KaaRestPluginConfigSchema RecordBuilder */ public static org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder newBuilder() { return new org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder(); } /** * Creates a new KaaRestPluginConfigSchema RecordBuilder by copying an existing Builder */ public static org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder newBuilder(org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder other) { return new org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder(other); } /** * Creates a new KaaRestPluginConfigSchema RecordBuilder by copying an existing * KaaRestPluginConfigSchema instance */ public static org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder newBuilder(org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema other) { return new org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.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 host; case 1: return port; case 2: return httpSchema; case 3: return keyStoreFileName; case 4: return keyStorePass; 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: host = (java.lang.String) value$; break; case 1: port = (java.lang.Integer) value$; break; case 2: httpSchema = (org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType) value$; break; case 3: keyStoreFileName = (java.lang.String) value$; break; case 4: keyStorePass = (java.lang.String) value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'host' field. */ public java.lang.String getHost() { return host; } /** * Sets the value of the 'host' field. * * @param value the value to set. */ public void setHost(java.lang.String value) { this.host = value; } /** * Gets the value of the 'port' field. */ public java.lang.Integer getPort() { return port; } /** * Sets the value of the 'port' field. * * @param value the value to set. */ public void setPort(java.lang.Integer value) { this.port = value; } /** * Gets the value of the 'httpSchema' field. */ public org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType getHttpSchema() { return httpSchema; } /** * Sets the value of the 'httpSchema' field. * * @param value the value to set. */ public void setHttpSchema(org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType value) { this.httpSchema = value; } /** * Gets the value of the 'keyStoreFileName' field. */ public java.lang.String getKeyStoreFileName() { return keyStoreFileName; } /** * Sets the value of the 'keyStoreFileName' field. * * @param value the value to set. */ public void setKeyStoreFileName(java.lang.String value) { this.keyStoreFileName = value; } /** * Gets the value of the 'keyStorePass' field. */ public java.lang.String getKeyStorePass() { return keyStorePass; } /** * Sets the value of the 'keyStorePass' field. * * @param value the value to set. */ public void setKeyStorePass(java.lang.String value) { this.keyStorePass = value; } /** * RecordBuilder for KaaRestPluginConfigSchema instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<KaaRestPluginConfigSchema> implements org.apache.avro.data.RecordBuilder<KaaRestPluginConfigSchema> { private java.lang.String host; private int port; private org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType httpSchema; private java.lang.String keyStoreFileName; private java.lang.String keyStorePass; /** * Creates a new Builder */ private Builder() { super(org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.SCHEMA$); } /** * Creates a Builder by copying an existing Builder */ private Builder(org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder other) { super(other); if (isValidValue(fields()[0], other.host)) { this.host = data().deepCopy(fields()[0].schema(), other.host); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.port)) { this.port = data().deepCopy(fields()[1].schema(), other.port); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.httpSchema)) { this.httpSchema = data().deepCopy(fields()[2].schema(), other.httpSchema); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.keyStoreFileName)) { this.keyStoreFileName = data().deepCopy(fields()[3].schema(), other.keyStoreFileName); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.keyStorePass)) { this.keyStorePass = data().deepCopy(fields()[4].schema(), other.keyStorePass); fieldSetFlags()[4] = true; } } /** * Creates a Builder by copying an existing KaaRestPluginConfigSchema instance */ private Builder(org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema other) { super(org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.SCHEMA$); if (isValidValue(fields()[0], other.host)) { this.host = data().deepCopy(fields()[0].schema(), other.host); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.port)) { this.port = data().deepCopy(fields()[1].schema(), other.port); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.httpSchema)) { this.httpSchema = data().deepCopy(fields()[2].schema(), other.httpSchema); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.keyStoreFileName)) { this.keyStoreFileName = data().deepCopy(fields()[3].schema(), other.keyStoreFileName); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.keyStorePass)) { this.keyStorePass = data().deepCopy(fields()[4].schema(), other.keyStorePass); fieldSetFlags()[4] = true; } } /** * Gets the value of the 'host' field */ public java.lang.String getHost() { return host; } /** * Sets the value of the 'host' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder setHost(java.lang.String value) { validate(fields()[0], value); this.host = value; fieldSetFlags()[0] = true; return this; } /** * Checks whether the 'host' field has been set */ public boolean hasHost() { return fieldSetFlags()[0]; } /** * Clears the value of the 'host' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder clearHost() { host = null; fieldSetFlags()[0] = false; return this; } /** * Gets the value of the 'port' field */ public java.lang.Integer getPort() { return port; } /** * Sets the value of the 'port' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder setPort(int value) { validate(fields()[1], value); this.port = value; fieldSetFlags()[1] = true; return this; } /** * Checks whether the 'port' field has been set */ public boolean hasPort() { return fieldSetFlags()[1]; } /** * Clears the value of the 'port' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder clearPort() { fieldSetFlags()[1] = false; return this; } /** * Gets the value of the 'httpSchema' field */ public org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType getHttpSchema() { return httpSchema; } /** * Sets the value of the 'httpSchema' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder setHttpSchema(org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType value) { validate(fields()[2], value); this.httpSchema = value; fieldSetFlags()[2] = true; return this; } /** * Checks whether the 'httpSchema' field has been set */ public boolean hasHttpSchema() { return fieldSetFlags()[2]; } /** * Clears the value of the 'httpSchema' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder clearHttpSchema() { httpSchema = null; fieldSetFlags()[2] = false; return this; } /** * Gets the value of the 'keyStoreFileName' field */ public java.lang.String getKeyStoreFileName() { return keyStoreFileName; } /** * Sets the value of the 'keyStoreFileName' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder setKeyStoreFileName(java.lang.String value) { validate(fields()[3], value); this.keyStoreFileName = value; fieldSetFlags()[3] = true; return this; } /** * Checks whether the 'keyStoreFileName' field has been set */ public boolean hasKeyStoreFileName() { return fieldSetFlags()[3]; } /** * Clears the value of the 'keyStoreFileName' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder clearKeyStoreFileName() { keyStoreFileName = null; fieldSetFlags()[3] = false; return this; } /** * Gets the value of the 'keyStorePass' field */ public java.lang.String getKeyStorePass() { return keyStorePass; } /** * Sets the value of the 'keyStorePass' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder setKeyStorePass(java.lang.String value) { validate(fields()[4], value); this.keyStorePass = value; fieldSetFlags()[4] = true; return this; } /** * Checks whether the 'keyStorePass' field has been set */ public boolean hasKeyStorePass() { return fieldSetFlags()[4]; } /** * Clears the value of the 'keyStorePass' field */ public org.kaaproject.kaa.server.plugin.rest.gen.KaaRestPluginConfigSchema.Builder clearKeyStorePass() { keyStorePass = null; fieldSetFlags()[4] = false; return this; } @Override public KaaRestPluginConfigSchema build() { try { KaaRestPluginConfigSchema record = new KaaRestPluginConfigSchema(); record.host = fieldSetFlags()[0] ? this.host : (java.lang.String) defaultValue(fields()[0]); record.port = fieldSetFlags()[1] ? this.port : (java.lang.Integer) defaultValue(fields()[1]); record.httpSchema = fieldSetFlags()[2] ? this.httpSchema : (org.kaaproject.kaa.server.plugin.rest.gen.HttpSchemaType) defaultValue(fields()[2]); record.keyStoreFileName = fieldSetFlags()[3] ? this.keyStoreFileName : (java.lang.String) defaultValue(fields()[3]); record.keyStorePass = fieldSetFlags()[4] ? this.keyStorePass : (java.lang.String) defaultValue(fields()[4]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }