.setName(jsonStream.getName()) .setLatestKeySchema(keySchema) .setLatestValueSchema(valueSchema) .setOperationType(operationType) .setOwner(jsonStream.getOwner()) .setUpdated(System.currentTimeMillis()) .setGithubUrl(jsonStream.getGithubUrl()) .setIsDataNeededAtRest(jsonStream.getIsDataNeededAtRest()) .setIsAutomationNeeded(jsonStream.getIsAutomationNeeded()) .setTags(tags) .setVpcList(jsonStream.getVpcList()) .setReplicatedVpcList(jsonStream.getReplicatedVpcList()) .setTopicConfig(jsonStream.getTopicConfig()) .setPartitions(jsonStream.getPartitions()) .setReplicationFactor(jsonStream.getReplicationFactor()) .build();
if (isValidValue(fields()[0], other.name)) { this.name = data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; if (isValidValue(fields()[1], other.schemaCompatibility)) { this.schemaCompatibility = data().deepCopy(fields()[1].schema(), other.schemaCompatibility); fieldSetFlags()[1] = true; if (isValidValue(fields()[2], other.latestKeySchema)) { this.latestKeySchema = data().deepCopy(fields()[2].schema(), other.latestKeySchema); fieldSetFlags()[2] = true; if (isValidValue(fields()[3], other.latestValueSchema)) { this.latestValueSchema = data().deepCopy(fields()[3].schema(), other.latestValueSchema); fieldSetFlags()[3] = true; if (isValidValue(fields()[4], other.owner)) { this.owner = data().deepCopy(fields()[4].schema(), other.owner); fieldSetFlags()[4] = true; if (isValidValue(fields()[5], other.created)) { this.created = data().deepCopy(fields()[5].schema(), other.created); fieldSetFlags()[5] = true; if (isValidValue(fields()[6], other.updated)) { this.updated = data().deepCopy(fields()[6].schema(), other.updated); fieldSetFlags()[6] = true; if (isValidValue(fields()[7], other.githubUrl)) {
try { AvroStream record = new AvroStream(); record.name = fieldSetFlags()[0] ? this.name : (java.lang.String) defaultValue(fields()[0]); 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 = fieldSetFlags()[3] ? this.latestValueSchema : (com.homeaway.digitalplatform.streamregistry.Schema) defaultValue(fields()[3]); record.owner = fieldSetFlags()[4] ? this.owner : (java.lang.String) defaultValue(fields()[4]); record.created = fieldSetFlags()[5] ? this.created : (java.lang.Long) defaultValue(fields()[5]); record.updated = fieldSetFlags()[6] ? this.updated : (java.lang.Long) defaultValue(fields()[6]); record.githubUrl = fieldSetFlags()[7] ? this.githubUrl : (java.lang.String) defaultValue(fields()[7]); if (tagsBuilder != null) { record.tags = this.tagsBuilder.build(); } else { record.tags = fieldSetFlags()[8] ? this.tags : (com.homeaway.digitalplatform.streamregistry.Tags) defaultValue(fields()[8]); record.producers = fieldSetFlags()[9] ? this.producers : (java.util.List<com.homeaway.digitalplatform.streamregistry.Producer>) defaultValue(fields()[9]); record.consumers = fieldSetFlags()[10] ? this.consumers : (java.util.List<com.homeaway.digitalplatform.streamregistry.Consumer>) defaultValue(fields()[10]); record.isDataNeededAtRest = fieldSetFlags()[11] ? this.isDataNeededAtRest : (java.lang.Boolean) defaultValue(fields()[11]); record.isAutomationNeeded = fieldSetFlags()[12] ? this.isAutomationNeeded : (java.lang.Boolean) defaultValue(fields()[12]); record.regionReplicatorList = fieldSetFlags()[13] ? this.regionReplicatorList : (java.util.List<com.homeaway.digitalplatform.streamregistry.RegionReplicator>) defaultValue(fields()[13]); record.s3ConnectorList = fieldSetFlags()[14] ? this.s3ConnectorList : (java.util.List<com.homeaway.digitalplatform.streamregistry.S3Connector>) defaultValue(fields()[14]); record.operationType = fieldSetFlags()[15] ? this.operationType : (com.homeaway.digitalplatform.streamregistry.OperationType) defaultValue(fields()[15]); record.vpcList = fieldSetFlags()[16] ? this.vpcList : (java.util.List<java.lang.String>) defaultValue(fields()[16]); record.replicatedVpcList = fieldSetFlags()[17] ? this.replicatedVpcList : (java.util.List<java.lang.String>) defaultValue(fields()[17]);
if (isValidValue(fields()[0], other.name)) { this.name = data().deepCopy(fields()[0].schema(), other.name); fieldSetFlags()[0] = true; if (isValidValue(fields()[1], other.schemaCompatibility)) { this.schemaCompatibility = data().deepCopy(fields()[1].schema(), other.schemaCompatibility); fieldSetFlags()[1] = true; if (isValidValue(fields()[2], other.latestKeySchema)) { this.latestKeySchema = data().deepCopy(fields()[2].schema(), other.latestKeySchema); fieldSetFlags()[2] = true; if (other.hasLatestKeySchemaBuilder()) { this.latestKeySchemaBuilder = com.homeaway.digitalplatform.streamregistry.Schema.newBuilder(other.getLatestKeySchemaBuilder()); if (isValidValue(fields()[3], other.latestValueSchema)) { this.latestValueSchema = data().deepCopy(fields()[3].schema(), other.latestValueSchema); fieldSetFlags()[3] = true; if (other.hasLatestValueSchemaBuilder()) { this.latestValueSchemaBuilder = com.homeaway.digitalplatform.streamregistry.Schema.newBuilder(other.getLatestValueSchemaBuilder()); if (isValidValue(fields()[4], other.owner)) { this.owner = data().deepCopy(fields()[4].schema(), other.owner); fieldSetFlags()[4] = true; if (isValidValue(fields()[5], other.created)) { this.created = data().deepCopy(fields()[5].schema(), other.created); fieldSetFlags()[5] = true;
/** * Sets the value of the 'name' 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 'name'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder setName(java.lang.String value) { validate(fields()[0], value); this.name = value; fieldSetFlags()[0] = true; return this; }
/** * Sets the value of the 'latestKeySchema' field. * * Latest Key Schema * @param value The value of 'latestKeySchema'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder setLatestKeySchema(com.homeaway.digitalplatform.streamregistry.Schema value) { validate(fields()[2], value); this.latestKeySchemaBuilder = null; this.latestKeySchema = value; fieldSetFlags()[2] = true; return this; }
/** * Sets the value of the 'latestValueSchema' field. * * Latest Value Schema * @param value The value of 'latestValueSchema'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder setLatestValueSchema(com.homeaway.digitalplatform.streamregistry.Schema value) { validate(fields()[3], value); this.latestValueSchemaBuilder = null; this.latestValueSchema = value; fieldSetFlags()[3] = true; return this; }
/** * Sets the value of the 'tags' field. * * Tags for the app. * @param value The value of 'tags'. * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder setTags(com.homeaway.digitalplatform.streamregistry.Tags value) { validate(fields()[8], value); this.tagsBuilder = null; this.tags = value; fieldSetFlags()[8] = true; return this; }
/** * Clears the value of the 'partitions' field. * * Number of Partitions * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder clearPartitions() { fieldSetFlags()[19] = false; return this; }
/** * Clears the value of the 'topicConfig' field. * * Topic Configuration * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder clearTopicConfig() { topicConfig = null; fieldSetFlags()[18] = false; return this; }
/** * Clears the value of the 'replicatedVpcList' field. * * List of Regions to which the stream will be replicated automatically * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder clearReplicatedVpcList() { replicatedVpcList = null; fieldSetFlags()[17] = false; return this; }
/** * Checks whether the 'operationType' field has been set. * * Operation Type * @return True if the 'operationType' field has been set, false otherwise. */ public boolean hasOperationType() { return fieldSetFlags()[15]; }
/** * Clears the value of the 'isDataNeededAtRest' field. * * Is Data Needed At Rest? Example: Kafka Connect S3 * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder clearIsDataNeededAtRest() { fieldSetFlags()[11] = false; return this; }
/** * Clears the value of the 'producers' field. * * Producers * @return This builder. */ public com.homeaway.digitalplatform.streamregistry.AvroStream.Builder clearProducers() { producers = null; fieldSetFlags()[9] = false; return this; }
/** * Checks whether the 'updated' field has been set. * * Updated Time in millis from epoch * @return True if the 'updated' field has been set, false otherwise. */ public boolean hasUpdated() { return fieldSetFlags()[6]; }
/** * Checks whether the 'created' field has been set. * * Created Time in millis from epoch * @return True if the 'created' field has been set, false otherwise. */ public boolean hasCreated() { return fieldSetFlags()[5]; }
/** * Checks whether the 'latestKeySchema' field has been set. * * Latest Key Schema * @return True if the 'latestKeySchema' field has been set, false otherwise. */ public boolean hasLatestKeySchema() { return fieldSetFlags()[2]; }
/** * Clears the value of the 'name' 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.AvroStream.Builder clearName() { name = null; fieldSetFlags()[0] = false; return this; }
/** * Checks whether the 'replicationFactor' field has been set. * * Replication Factor * @return True if the 'replicationFactor' field has been set, false otherwise. */ public boolean hasReplicationFactor() { return fieldSetFlags()[20]; }
/** * Checks whether the 'partitions' field has been set. * * Number of Partitions * @return True if the 'partitions' field has been set, false otherwise. */ public boolean hasPartitions() { return fieldSetFlags()[19]; }