/** * Creates a Builder by copying an existing BootstrapNodeInfo instance */ private Builder(org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo other) { super(org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.SCHEMA$); if (isValidValue(fields()[0], other.connectionInfo)) { this.connectionInfo = data().deepCopy(fields()[0].schema(), other.connectionInfo); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.transports)) { this.transports = data().deepCopy(fields()[1].schema(), other.transports); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.timeStarted)) { this.timeStarted = data().deepCopy(fields()[2].schema(), other.timeStarted); fieldSetFlags()[2] = true; } }
@Override public BootstrapNodeInfo build() { try { BootstrapNodeInfo record = new BootstrapNodeInfo(); record.connectionInfo = fieldSetFlags()[0] ? this.connectionInfo : (org.kaaproject.kaa.server.common.zk.gen.ConnectionInfo) defaultValue(fields()[0]); record.transports = fieldSetFlags()[1] ? this.transports : (java.util.List<org.kaaproject.kaa.server.common.zk.gen.TransportMetaData>) defaultValue(fields()[1]); record.timeStarted = fieldSetFlags()[2] ? this.timeStarted : (java.lang.Long) defaultValue(fields()[2]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** * Creates a Builder by copying an existing Builder */ private Builder(org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder other) { super(other); if (isValidValue(fields()[0], other.connectionInfo)) { this.connectionInfo = data().deepCopy(fields()[0].schema(), other.connectionInfo); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.transports)) { this.transports = data().deepCopy(fields()[1].schema(), other.transports); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.timeStarted)) { this.timeStarted = data().deepCopy(fields()[2].schema(), other.timeStarted); fieldSetFlags()[2] = true; } }
/** * Clears the value of the 'connectionInfo' field */ public org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder clearConnectionInfo() { connectionInfo = null; fieldSetFlags()[0] = false; return this; }
/** * Checks whether the 'connectionInfo' field has been set */ public boolean hasConnectionInfo() { return fieldSetFlags()[0]; }
/** * Creates a new BootstrapNodeInfo RecordBuilder by copying an existing BootstrapNodeInfo instance */ public static org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder newBuilder(org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo other) { return new org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder(other); }
/** * Creates a new BootstrapNodeInfo RecordBuilder by copying an existing Builder */ public static org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder newBuilder(org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder other) { return new org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder(other); }
/** * Checks whether the 'timeStarted' field has been set */ public boolean hasTimeStarted() { return fieldSetFlags()[2]; }
/** * Clears the value of the 'timeStarted' field */ public org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder clearTimeStarted() { fieldSetFlags()[2] = false; return this; }
/** * Sets the value of the 'timeStarted' field */ public org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder setTimeStarted(long value) { validate(fields()[2], value); this.timeStarted = value; fieldSetFlags()[2] = true; return this; }
/** * Clears the value of the 'transports' field */ public org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder clearTransports() { transports = null; fieldSetFlags()[1] = false; return this; }
/** * Sets the value of the 'transports' field */ public org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder setTransports(java.util.List<org.kaaproject.kaa.server.common.zk.gen.TransportMetaData> value) { validate(fields()[1], value); this.transports = value; fieldSetFlags()[1] = true; return this; }
/** * Sets the value of the 'connectionInfo' field */ public org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder setConnectionInfo(org.kaaproject.kaa.server.common.zk.gen.ConnectionInfo value) { validate(fields()[0], value); this.connectionInfo = value; fieldSetFlags()[0] = true; return this; }
/** * Checks whether the 'transports' field has been set */ public boolean hasTransports() { return fieldSetFlags()[1]; }
/** * Creates a new BootstrapNodeInfo RecordBuilder */ public static org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder newBuilder() { return new org.kaaproject.kaa.server.common.zk.gen.BootstrapNodeInfo.Builder(); }