/** * Creates a Builder by copying an existing ControlNodeInfo instance */ private Builder(org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo other) { super(org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.SCHEMA$); if (isValidValue(fields()[0], other.connectionInfo)) { this.connectionInfo = data().deepCopy(fields()[0].schema(), other.connectionInfo); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.operationsServerCount)) { this.operationsServerCount = data().deepCopy(fields()[1].schema(), other.operationsServerCount); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.bootstrapServerCount)) { this.bootstrapServerCount = data().deepCopy(fields()[2].schema(), other.bootstrapServerCount); fieldSetFlags()[2] = true; } }
/** * Creates a Builder by copying an existing Builder */ private Builder(org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.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.operationsServerCount)) { this.operationsServerCount = data().deepCopy(fields()[1].schema(), other.operationsServerCount); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.bootstrapServerCount)) { this.bootstrapServerCount = data().deepCopy(fields()[2].schema(), other.bootstrapServerCount); fieldSetFlags()[2] = true; } }
@Override public ControlNodeInfo build() { try { ControlNodeInfo record = new ControlNodeInfo(); record.connectionInfo = fieldSetFlags()[0] ? this.connectionInfo : (org.kaaproject.kaa.server.common.zk.gen.ConnectionInfo) defaultValue(fields()[0]); record.operationsServerCount = fieldSetFlags()[1] ? this.operationsServerCount : (java.lang.Integer) defaultValue(fields()[1]); record.bootstrapServerCount = fieldSetFlags()[2] ? this.bootstrapServerCount : (java.lang.Integer) defaultValue(fields()[2]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** * Checks whether the 'bootstrapServerCount' field has been set */ public boolean hasBootstrapServerCount() { return fieldSetFlags()[2]; }
/** * Clears the value of the 'connectionInfo' field */ public org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.Builder clearConnectionInfo() { connectionInfo = null; fieldSetFlags()[0] = false; return this; }
/** * Checks whether the 'connectionInfo' field has been set */ public boolean hasConnectionInfo() { return fieldSetFlags()[0]; }
/** * Clears the value of the 'operationsServerCount' field */ public org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.Builder clearOperationsServerCount() { fieldSetFlags()[1] = false; return this; }
/** * Checks whether the 'operationsServerCount' field has been set */ public boolean hasOperationsServerCount() { return fieldSetFlags()[1]; }
/** * Sets the value of the 'connectionInfo' field */ public org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.Builder setConnectionInfo(org.kaaproject.kaa.server.common.zk.gen.ConnectionInfo value) { validate(fields()[0], value); this.connectionInfo = value; fieldSetFlags()[0] = true; return this; }
/** * Sets the value of the 'bootstrapServerCount' field */ public org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.Builder setBootstrapServerCount(int value) { validate(fields()[2], value); this.bootstrapServerCount = value; fieldSetFlags()[2] = true; return this; }
/** * Sets the value of the 'operationsServerCount' field */ public org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.Builder setOperationsServerCount(int value) { validate(fields()[1], value); this.operationsServerCount = value; fieldSetFlags()[1] = true; return this; }
/** * Clears the value of the 'bootstrapServerCount' field */ public org.kaaproject.kaa.server.common.zk.gen.ControlNodeInfo.Builder clearBootstrapServerCount() { fieldSetFlags()[2] = false; return this; }