.setSchemaString(jsonKeySchema.getSchemaString()) .setId(jsonKeySchema.getId()) .setSubjectId(jsonKeySchema.getVersion()) .setCreated(String.valueOf(Calendar.getInstance().getTime())) .setUpdated(String.valueOf(Calendar.getInstance().getTime())) .build(); .setSchemaString(jsonValueSchema.getSchemaString()) .setId(jsonValueSchema.getId()) .setSubjectId(jsonValueSchema.getVersion()) .setCreated(String.valueOf(Calendar.getInstance().getTime())) .setUpdated(String.valueOf(Calendar.getInstance().getTime())) .build(); Tags tags = Tags.newBuilder().setProductId(jsonTags.getProductId()) .setPortfolioId(jsonTags.getPortfolioId())
/** * Creates a Builder by copying an existing Builder. * @param other The existing Builder to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.Schema.Builder other) { super(other); if (isValidValue(fields()[0], other.id)) { this.id = data().deepCopy(fields()[0].schema(), other.id); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.subjectId)) { this.subjectId = data().deepCopy(fields()[1].schema(), other.subjectId); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.schemaString)) { this.schemaString = data().deepCopy(fields()[2].schema(), other.schemaString); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.created)) { this.created = data().deepCopy(fields()[3].schema(), other.created); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.updated)) { this.updated = data().deepCopy(fields()[4].schema(), other.updated); fieldSetFlags()[4] = true; } }
@Override @SuppressWarnings("unchecked") public Schema build() { try { Schema record = new Schema(); record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]); record.subjectId = fieldSetFlags()[1] ? this.subjectId : (java.lang.Integer) defaultValue(fields()[1]); record.schemaString = fieldSetFlags()[2] ? this.schemaString : (java.lang.String) defaultValue(fields()[2]); record.created = fieldSetFlags()[3] ? this.created : (java.lang.String) defaultValue(fields()[3]); record.updated = fieldSetFlags()[4] ? this.updated : (java.lang.String) defaultValue(fields()[4]); return record; } catch (java.lang.Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
record.schemaCompatibility = fieldSetFlags()[1] ? this.schemaCompatibility : (com.homeaway.digitalplatform.streamregistry.SchemaCompatibility) defaultValue(fields()[1]); if (latestKeySchemaBuilder != null) { record.latestKeySchema = this.latestKeySchemaBuilder.build(); } else { record.latestKeySchema = fieldSetFlags()[2] ? this.latestKeySchema : (com.homeaway.digitalplatform.streamregistry.Schema) defaultValue(fields()[2]); record.latestValueSchema = this.latestValueSchemaBuilder.build(); } else { record.latestValueSchema = fieldSetFlags()[3] ? this.latestValueSchema : (com.homeaway.digitalplatform.streamregistry.Schema) defaultValue(fields()[3]);
/** * Creates a Builder by copying an existing Schema instance * @param other The existing instance to copy. */ private Builder(com.homeaway.digitalplatform.streamregistry.Schema other) { super(SCHEMA$); if (isValidValue(fields()[0], other.id)) { this.id = data().deepCopy(fields()[0].schema(), other.id); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.subjectId)) { this.subjectId = data().deepCopy(fields()[1].schema(), other.subjectId); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.schemaString)) { this.schemaString = data().deepCopy(fields()[2].schema(), other.schemaString); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.created)) { this.created = data().deepCopy(fields()[3].schema(), other.created); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.updated)) { this.updated = data().deepCopy(fields()[4].schema(), other.updated); fieldSetFlags()[4] = true; } }
/** * Clears the value of the 'updated' field. * * Time in millis from epoc * Auto generated * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder clearUpdated() { updated = null; fieldSetFlags()[4] = false; return this; }
/** * Clears the value of the 'schemaString' field. * * Schema string json * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder clearSchemaString() { schemaString = null; fieldSetFlags()[2] = false; return this; }
/** * Clears the value of the 'subjectId' field. * * subject id in schema registry. (Not required on input) * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder clearSubjectId() { fieldSetFlags()[1] = false; return this; }
/** * Checks whether the 'subjectId' field has been set. * * subject id in schema registry. (Not required on input) * @return True if the 'subjectId' field has been set, false otherwise. */ public boolean hasSubjectId() { return fieldSetFlags()[1]; }
/** * Clears the value of the 'id' field. * * schema id in schema registry. (Not required on input) * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder clearId() { id = null; fieldSetFlags()[0] = false; return this; }
/** * Creates a new Schema RecordBuilder by copying an existing Schema instance. * @param other The existing instance to copy. * @return A new Schema RecordBuilder */ public static com.homeaway.digitalplatform.streamregistry.Schema.Builder newBuilder(com.homeaway.digitalplatform.streamregistry.Schema other) { return new com.homeaway.digitalplatform.streamregistry.Schema.Builder(other); }
/** * Creates a new Schema RecordBuilder by copying an existing Builder. * @param other The existing builder to copy. * @return A new Schema RecordBuilder */ public static com.homeaway.digitalplatform.streamregistry.Schema.Builder newBuilder(com.homeaway.digitalplatform.streamregistry.Schema.Builder other) { return new com.homeaway.digitalplatform.streamregistry.Schema.Builder(other); }
/** * Sets the value of the 'created' field. * * Time in millis from epoc * Auto generated * @param value The value of 'created'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder setCreated(java.lang.String value) { validate(fields()[3], value); this.created = value; fieldSetFlags()[3] = true; return this; }
/** * Clears the value of the 'created' field. * * Time in millis from epoc * Auto generated * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder clearCreated() { created = null; fieldSetFlags()[3] = false; return this; }
/** * Checks whether the 'id' field has been set. * * schema id in schema registry. (Not required on input) * @return True if the 'id' field has been set, false otherwise. */ public boolean hasId() { return fieldSetFlags()[0]; }
/** * Checks whether the 'created' field has been set. * * Time in millis from epoc * Auto generated * @return True if the 'created' field has been set, false otherwise. */ public boolean hasCreated() { return fieldSetFlags()[3]; }
/** * Sets the value of the 'id' field. * * schema id in schema registry. (Not required on input) * @param value The value of 'id'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder setId(java.lang.String value) { validate(fields()[0], value); this.id = value; fieldSetFlags()[0] = true; return this; }
/** * Sets the value of the 'schemaString' field. * * Schema string json * @param value The value of 'schemaString'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.Schema.Builder setSchemaString(java.lang.String value) { validate(fields()[2], value); this.schemaString = value; fieldSetFlags()[2] = true; return this; }
/** * Checks whether the 'updated' field has been set. * * Time in millis from epoc * Auto generated * @return True if the 'updated' field has been set, false otherwise. */ public boolean hasUpdated() { return fieldSetFlags()[4]; }
/** * Checks whether the 'schemaString' field has been set. * * Schema string json * @return True if the 'schemaString' field has been set, false otherwise. */ public boolean hasSchemaString() { return fieldSetFlags()[2]; }