/** * Creates a Builder by copying an existing Actor instance * @param other The existing instance to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.Actor other) { super(SCHEMA$); if (isValidValue(fields()[0], other.name)) { this.name = data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.regionStreamConfigurations)) { this.regionStreamConfigurations = data().deepCopy(fields()[1].schema(), other.regionStreamConfigurations); fieldSetFlags()[1] = true; } }
/** * Creates a Builder by copying an existing Builder. * @param other The existing Builder to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.Actor.Builder other) { super(other); if (isValidValue(fields()[0], other.name)) { this.name = data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.regionStreamConfigurations)) { this.regionStreamConfigurations = data().deepCopy(fields()[1].schema(), other.regionStreamConfigurations); fieldSetFlags()[1] = true; } }
@Override @SuppressWarnings("unchecked") public Actor build() { try { Actor record = new Actor(); record.name = fieldSetFlags()[0] ? this.name : (java.lang.String) defaultValue(fields()[0]); record.regionStreamConfigurations = fieldSetFlags()[1] ? this.regionStreamConfigurations : (java.util.List<com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration>) defaultValue(fields()[1]); return record; } catch (java.lang.Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** * Checks whether the 'name' field has been set. * * Application name of the actor * @return True if the 'name' field has been set, false otherwise. */ public boolean hasName() { return fieldSetFlags()[0]; }
/** * Sets the value of the 'name' field. * * Application name of the actor * @param value The value of 'name'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Actor.Builder setName(java.lang.String value) { validate(fields()[0], value); this.name = value; fieldSetFlags()[0] = true; return this; }
/** * Sets the value of the 'regionStreamConfigurations' field. * * Stream configuration key/value map * @param value The value of 'regionStreamConfigurations'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Actor.Builder setRegionStreamConfigurations(java.util.List<com.homeaway.digitalplatform.streamregistry.RegionStreamConfiguration> value) { validate(fields()[1], value); this.regionStreamConfigurations = value; fieldSetFlags()[1] = true; return this; }
/** * Clears the value of the 'name' field. * * Application name of the actor * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Actor.Builder clearName() { name = null; fieldSetFlags()[0] = false; return this; }
/** * Checks whether the 'regionStreamConfigurations' field has been set. * * Stream configuration key/value map * @return True if the 'regionStreamConfigurations' field has been set, false otherwise. */ public boolean hasRegionStreamConfigurations() { return fieldSetFlags()[1]; }
/** * Clears the value of the 'regionStreamConfigurations' field. * * Stream configuration key/value map * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Actor.Builder clearRegionStreamConfigurations() { regionStreamConfigurations = null; fieldSetFlags()[1] = false; return this; }