/** * Creates a Builder by copying an existing Builder. * @param other The existing Builder to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder other) { super(other); if (isValidValue(fields()[0], other.vpc)) { this.vpc = data().deepCopy(fields()[0].schema(), other.vpc); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.env)) { this.env = data().deepCopy(fields()[1].schema(), other.env); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.hint)) { this.hint = data().deepCopy(fields()[2].schema(), other.hint); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.type)) { this.type = data().deepCopy(fields()[3].schema(), other.type); fieldSetFlags()[3] = true; } }
@Override @SuppressWarnings("unchecked") public ClusterKey build() { try { ClusterKey record = new ClusterKey(); record.vpc = fieldSetFlags()[0] ? this.vpc : (java.lang.String) defaultValue(fields()[0]); record.env = fieldSetFlags()[1] ? this.env : (java.lang.String) defaultValue(fields()[1]); record.hint = fieldSetFlags()[2] ? this.hint : (java.lang.String) defaultValue(fields()[2]); record.type = fieldSetFlags()[3] ? this.type : (java.lang.String) defaultValue(fields()[3]); return record; } catch (java.lang.Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** * Creates a Builder by copying an existing ClusterKey instance * @param other The existing instance to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.ClusterKey other) { super(SCHEMA$); if (isValidValue(fields()[0], other.vpc)) { this.vpc = data().deepCopy(fields()[0].schema(), other.vpc); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.env)) { this.env = data().deepCopy(fields()[1].schema(), other.env); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.hint)) { this.hint = data().deepCopy(fields()[2].schema(), other.hint); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.type)) { this.type = data().deepCopy(fields()[3].schema(), other.type); fieldSetFlags()[3] = true; } }
/** * Clears the value of the 'type' field. * * type of cluster ex: producer, consumer * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder clearType() { type = null; fieldSetFlags()[3] = false; return this; }
/** * Clears the value of the 'hint' field. * * hint for the cluster ex: primary, other, etc.. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder clearHint() { hint = null; fieldSetFlags()[2] = false; return this; }
/** * Checks whether the 'env' field has been set. * * environment Ex: dev, test, stage, prod * @return True if the 'env' field has been set, false otherwise. */ public boolean hasEnv() { return fieldSetFlags()[1]; }
/** * Checks whether the 'vpc' field has been set. * * vpc name * @return True if the 'vpc' field has been set, false otherwise. */ public boolean hasVpc() { return fieldSetFlags()[0]; }
/** * Sets the value of the 'vpc' field. * * vpc name * @param value The value of 'vpc'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder setVpc(java.lang.String value) { validate(fields()[0], value); this.vpc = value; fieldSetFlags()[0] = true; return this; }
/** * Checks whether the 'hint' field has been set. * * hint for the cluster ex: primary, other, etc.. * @return True if the 'hint' field has been set, false otherwise. */ public boolean hasHint() { return fieldSetFlags()[2]; }
/** * Creates a new ClusterKey RecordBuilder by copying an existing ClusterKey instance. * @param other The existing instance to copy. * @return A new ClusterKey RecordBuilder */ public static com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder newBuilder(com.homeaway.digitalplatform.streamregistry.ClusterKey other) { return new com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder(other); }
/** * Creates a new ClusterKey RecordBuilder by copying an existing Builder. * @param other The existing builder to copy. * @return A new ClusterKey RecordBuilder */ public static com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder newBuilder(com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder other) { return new com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder(other); }
/** * Checks whether the 'type' field has been set. * * type of cluster ex: producer, consumer * @return True if the 'type' field has been set, false otherwise. */ public boolean hasType() { return fieldSetFlags()[3]; }
/** * Clears the value of the 'vpc' field. * * vpc name * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder clearVpc() { vpc = null; fieldSetFlags()[0] = false; return this; }
/** * Clears the value of the 'env' field. * * environment Ex: dev, test, stage, prod * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder clearEnv() { env = null; fieldSetFlags()[1] = false; return this; }
/** * Sets the value of the 'hint' field. * * hint for the cluster ex: primary, other, etc.. * @param value The value of 'hint'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder setHint(java.lang.String value) { validate(fields()[2], value); this.hint = value; fieldSetFlags()[2] = true; return this; }
/** * Sets the value of the 'env' field. * * environment Ex: dev, test, stage, prod * @param value The value of 'env'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder setEnv(java.lang.String value) { validate(fields()[1], value); this.env = value; fieldSetFlags()[1] = true; return this; }
/** * Creates a new ClusterKey RecordBuilder. * @return A new ClusterKey RecordBuilder */ public static com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder newBuilder() { return new com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder(); }
/** * Sets the value of the 'type' field. * * type of cluster ex: producer, consumer * @param value The value of 'type'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.ClusterKey.Builder setType(java.lang.String value) { validate(fields()[3], value); this.type = value; fieldSetFlags()[3] = true; return this; }