/** * Creates a Builder by copying an existing GobblinTrackingEvent instance * @param other The existing instance to copy. */ private Builder(org.apache.gobblin.metrics.GobblinTrackingEvent other) { super(SCHEMA$); if (isValidValue(fields()[0], other.timestamp)) { this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.namespace)) { this.namespace = data().deepCopy(fields()[1].schema(), other.namespace); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.name)) { this.name = data().deepCopy(fields()[2].schema(), other.name); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.metadata)) { this.metadata = data().deepCopy(fields()[3].schema(), other.metadata); fieldSetFlags()[3] = true; } }
/** * Creates a Builder by copying an existing Builder. * @param other The existing Builder to copy. */ private Builder(org.apache.gobblin.metrics.GobblinTrackingEvent.Builder other) { super(other); if (isValidValue(fields()[0], other.timestamp)) { this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.namespace)) { this.namespace = data().deepCopy(fields()[1].schema(), other.namespace); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.name)) { this.name = data().deepCopy(fields()[2].schema(), other.name); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.metadata)) { this.metadata = data().deepCopy(fields()[3].schema(), other.metadata); fieldSetFlags()[3] = true; } }
@Override public GobblinTrackingEvent build() { try { GobblinTrackingEvent record = new GobblinTrackingEvent(); record.timestamp = fieldSetFlags()[0] ? this.timestamp : (java.lang.Long) defaultValue(fields()[0]); record.namespace = fieldSetFlags()[1] ? this.namespace : (java.lang.String) defaultValue(fields()[1]); record.name = fieldSetFlags()[2] ? this.name : (java.lang.String) defaultValue(fields()[2]); record.metadata = fieldSetFlags()[3] ? this.metadata : (java.util.Map<java.lang.String,java.lang.String>) defaultValue(fields()[3]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** * Sets the value of the 'metadata' field. * Event metadata. * @param value The value of 'metadata'. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> value) { validate(fields()[3], value); this.metadata = value; fieldSetFlags()[3] = true; return this; }
/** * Clears the value of the 'name' field. * Event name. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearName() { name = null; fieldSetFlags()[2] = false; return this; }
/** * Clears the value of the 'namespace' field. * Namespace used for filtering of events. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearNamespace() { namespace = null; fieldSetFlags()[1] = false; return this; }
/** * Clears the value of the 'timestamp' field. * Time at which event was created. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearTimestamp() { fieldSetFlags()[0] = false; return this; }
/** * Checks whether the 'metadata' field has been set. * Event metadata. * @return True if the 'metadata' field has been set, false otherwise. */ public boolean hasMetadata() { return fieldSetFlags()[3]; }
/** * Clears the value of the 'metadata' field. * Event metadata. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearMetadata() { metadata = null; fieldSetFlags()[3] = false; return this; }
/** * Sets the value of the 'namespace' field. * Namespace used for filtering of events. * @param value The value of 'namespace'. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setNamespace(java.lang.String value) { validate(fields()[1], value); this.namespace = value; fieldSetFlags()[1] = true; return this; }
/** * Clears the value of the 'timestamp' field. * Time at which event was created. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearTimestamp() { fieldSetFlags()[0] = false; return this; }
/** * Sets the value of the 'timestamp' field. * Time at which event was created. * @param value The value of 'timestamp'. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setTimestamp(long value) { validate(fields()[0], value); this.timestamp = value; fieldSetFlags()[0] = true; return this; }
/** * Sets the value of the 'metadata' field. * Event metadata. * @param value The value of 'metadata'. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> value) { validate(fields()[3], value); this.metadata = value; fieldSetFlags()[3] = true; return this; }
/** * Checks whether the 'name' field has been set. * Event name. * @return True if the 'name' field has been set, false otherwise. */ public boolean hasName() { return fieldSetFlags()[2]; }
/** * Sets the value of the 'name' field. * Event name. * @param value The value of 'name'. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setName(java.lang.String value) { validate(fields()[2], value); this.name = value; fieldSetFlags()[2] = true; return this; }
/** * Clears the value of the 'namespace' field. * Namespace used for filtering of events. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearNamespace() { namespace = null; fieldSetFlags()[1] = false; return this; }
/** * Checks whether the 'timestamp' field has been set. * Time at which event was created. * @return True if the 'timestamp' field has been set, false otherwise. */ public boolean hasTimestamp() { return fieldSetFlags()[0]; }
/** * Checks whether the 'namespace' field has been set. * Namespace used for filtering of events. * @return True if the 'namespace' field has been set, false otherwise. */ public boolean hasNamespace() { return fieldSetFlags()[1]; }
/** * Checks whether the 'metadata' field has been set. * Event metadata. * @return True if the 'metadata' field has been set, false otherwise. */ public boolean hasMetadata() { return fieldSetFlags()[3]; }
/** * Clears the value of the 'name' field. * Event name. * @return This builder. */ public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearName() { name = null; fieldSetFlags()[2] = false; return this; }