/** Creates a Builder by copying an existing IncompatibleEvent instance */ private Builder(org.kitesdk.data.event.IncompatibleEvent other) { super(org.kitesdk.data.event.IncompatibleEvent.SCHEMA$); if (isValidValue(fields()[0], other.userId)) { this.userId = data().deepCopy(fields()[0].schema(), other.userId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.sessionId)) { this.sessionId = data().deepCopy(fields()[1].schema(), other.sessionId); fieldSetFlags()[1] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.kitesdk.data.event.IncompatibleEvent.Builder other) { super(other); if (isValidValue(fields()[0], other.userId)) { this.userId = data().deepCopy(fields()[0].schema(), other.userId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.sessionId)) { this.sessionId = data().deepCopy(fields()[1].schema(), other.sessionId); fieldSetFlags()[1] = true; } }
@Override public IncompatibleEvent build() { try { IncompatibleEvent record = new IncompatibleEvent(); record.userId = fieldSetFlags()[0] ? this.userId : (java.lang.String) defaultValue(fields()[0]); record.sessionId = fieldSetFlags()[1] ? this.sessionId : (java.lang.String) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'sessionId' field */ public org.kitesdk.data.event.IncompatibleEvent.Builder setSessionId(java.lang.String value) { validate(fields()[1], value); this.sessionId = value; fieldSetFlags()[1] = true; return this; }
/** Sets the value of the 'userId' field */ public org.kitesdk.data.event.IncompatibleEvent.Builder setUserId(java.lang.String value) { validate(fields()[0], value); this.userId = value; fieldSetFlags()[0] = true; return this; }