/** * Creates a Builder by copying an existing Builder. * @param other The existing Builder to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.AvroStreamKey.Builder other) { super(other); if (isValidValue(fields()[0], other.streamName)) { this.streamName = data().deepCopy(fields()[0].schema(), other.streamName); fieldSetFlags()[0] = true; } }
/** * Creates a Builder by copying an existing AvroStreamKey instance * @param other The existing instance to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.AvroStreamKey other) { super(SCHEMA$); if (isValidValue(fields()[0], other.streamName)) { this.streamName = data().deepCopy(fields()[0].schema(), other.streamName); fieldSetFlags()[0] = true; } }
@Override @SuppressWarnings("unchecked") public AvroStreamKey build() { try { AvroStreamKey record = new AvroStreamKey(); record.streamName = fieldSetFlags()[0] ? this.streamName : (java.lang.String) defaultValue(fields()[0]); return record; } catch (java.lang.Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** * Sets the value of the 'streamName' field. * * Stream Name is the key for the Keyvalue store topic. * It will be converted to all lower case letters. * eg: test-stream-1 * @param value The value of 'streamName'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStreamKey.Builder setStreamName(java.lang.String value) { validate(fields()[0], value); this.streamName = value; fieldSetFlags()[0] = true; return this; }
/** * Checks whether the 'streamName' field has been set. * * Stream Name is the key for the Keyvalue store topic. * It will be converted to all lower case letters. * eg: test-stream-1 * @return True if the 'streamName' field has been set, false otherwise. */ public boolean hasStreamName() { return fieldSetFlags()[0]; }
/** * Clears the value of the 'streamName' field. * * Stream Name is the key for the Keyvalue store topic. * It will be converted to all lower case letters. * eg: test-stream-1 * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStreamKey.Builder clearStreamName() { streamName = null; fieldSetFlags()[0] = false; return this; }