From 6dd6093c7de4c40e5a0690873f7eb1d06806d53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wikie=C5=82?= Date: Mon, 11 Dec 2023 06:43:50 +0100 Subject: [PATCH 1/4] BigQuery sender leveraging Storage Write API JsonStreamWriter/SchemaAwareStreamWriter depending on topic's content type --- hermes-consumers/build.gradle | 3 +- .../config/ConsumerSenderConfiguration.java | 21 +++++ .../config/GoogleBigQueryConfiguration.java | 59 +++++++++++++ .../consumer/sender/SenderClient.java | 13 +++ .../consumer/sender/SenderClientsPool.java | 48 +++++++++++ .../consumer/sender/SenderTarget.java | 4 + .../GoogleBigQueryAppendCompleteCallback.java | 29 +++++++ .../GoogleBigQueryDataWriter.java | 57 +++++++++++++ .../GoogleBigQueryFailedAppendException.java | 10 +++ .../GoogleBigQueryMessageSenderProvider.java | 70 +++++++++++++++ .../GoogleBigQueryMessageTransformer.java | 9 ++ .../GoogleBigQuerySenderTarget.java | 49 +++++++++++ .../GoogleBigQuerySenderTargetResolver.java | 45 ++++++++++ .../GoogleBigQueryStreamWriterFactory.java | 6 ++ .../avro/GoogleBigQueryAvroDataWriter.java | 34 ++++++++ .../GoogleBigQueryAvroDataWriterPool.java | 20 +++++ .../GoogleBigQueryAvroMessageTransformer.java | 19 +++++ .../avro/GoogleBigQueryAvroSender.java | 43 ++++++++++ ...GoogleBigQueryAvroStreamWriterFactory.java | 57 +++++++++++++ .../GoogleBigQueryAvroToProtoConverter.java | 85 +++++++++++++++++++ .../json/GoogleBigQueryJsonDataWriter.java | 32 +++++++ .../GoogleBigQueryJsonDataWriterPool.java | 18 ++++ .../GoogleBigQueryJsonMessageTransformer.java | 19 +++++ .../json/GoogleBigQueryJsonSender.java | 44 ++++++++++ ...GoogleBigQueryJsonStreamWriterFactory.java | 52 ++++++++++++ .../googlepubsub/GooglePubSubClient.java | 9 +- .../googlepubsub/GooglePubSubClientsPool.java | 41 +-------- .../GooglePubSubSenderTarget.java | 3 +- .../EndpointAddressFormatValidator.java | 1 + 29 files changed, 856 insertions(+), 44 deletions(-) create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/GoogleBigQueryConfiguration.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClient.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClientsPool.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderTarget.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryAppendCompleteCallback.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryDataWriter.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryFailedAppendException.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProvider.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageTransformer.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTarget.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolver.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryStreamWriterFactory.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriter.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriterPool.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroMessageTransformer.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroSender.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroStreamWriterFactory.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriter.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriterPool.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformer.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonSender.java create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java diff --git a/hermes-consumers/build.gradle b/hermes-consumers/build.gradle index 44c66d5dc3..373cb3377f 100644 --- a/hermes-consumers/build.gradle +++ b/hermes-consumers/build.gradle @@ -34,7 +34,8 @@ dependencies { exclude module: 'hornetq-native' } - api(group: 'com.google.cloud', name: 'google-cloud-pubsub', version: '1.115.1') + api(group: 'com.google.cloud', name: 'google-cloud-pubsub', version: '1.125.11') + api(group: 'com.google.cloud', name: 'google-cloud-bigquery', version: '2.27.0') testImplementation project(':hermes-test-helper') testImplementation group: 'org.apache.curator', name: 'curator-test', version: versions.curator diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/ConsumerSenderConfiguration.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/ConsumerSenderConfiguration.java index 1958e4bff0..a6753e8735 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/ConsumerSenderConfiguration.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/ConsumerSenderConfiguration.java @@ -26,6 +26,11 @@ import pl.allegro.tech.hermes.consumers.consumer.sender.MessageBatchSenderFactory; import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSenderFactory; import pl.allegro.tech.hermes.consumers.consumer.sender.ProtocolMessageSenderProvider; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.*; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroDataWriterPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroMessageTransformer; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonDataWriterPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonMessageTransformer; import pl.allegro.tech.hermes.consumers.consumer.sender.googlepubsub.GooglePubSubMessageSenderProvider; import pl.allegro.tech.hermes.consumers.consumer.sender.googlepubsub.GooglePubSubMessageTransformerCreator; import pl.allegro.tech.hermes.consumers.consumer.sender.googlepubsub.GooglePubSubSenderTargetResolver; @@ -242,6 +247,22 @@ public ProtocolMessageSenderProvider pubSubMessageSenderProvider( ); } + @Bean(name = "defaultGoogleBigQueryMessageSenderProvider") + public ProtocolMessageSenderProvider googleBigQueryMessageSenderProvider( + GoogleBigQuerySenderTargetResolver senderTargetResolver, + GoogleBigQueryJsonMessageTransformer jsonMessageTransformer, + GoogleBigQueryAvroMessageTransformer avroMessageTransformer, + GoogleBigQueryJsonDataWriterPool jsonDataWriterPool, + GoogleBigQueryAvroDataWriterPool avroDataWriterPool) { + return new GoogleBigQueryMessageSenderProvider( + senderTargetResolver, + jsonMessageTransformer, + avroMessageTransformer, + jsonDataWriterPool, + avroDataWriterPool + ); + } + @Bean @Conditional(OnGoogleDefaultCredentials.class) public CredentialsProvider applicationDefaultCredentialsProvider() throws IOException { diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/GoogleBigQueryConfiguration.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/GoogleBigQueryConfiguration.java new file mode 100644 index 0000000000..03aeb37f6e --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/config/GoogleBigQueryConfiguration.java @@ -0,0 +1,59 @@ +package pl.allegro.tech.hermes.consumers.config; + +import com.google.api.gax.core.CredentialsProvider; +import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings; +import com.google.cloud.bigquery.storage.v1.stub.BigQueryWriteStubSettings; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.*; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroDataWriterPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroMessageTransformer; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroStreamWriterFactory; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroToProtoConverter; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonDataWriterPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonMessageTransformer; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonStreamWriterFactory; + +import java.io.IOException; + +@Configuration +public class GoogleBigQueryConfiguration { + + @Bean + public BigQueryWriteSettings bigQueryWriteSettings(CredentialsProvider credentialsProvider) throws IOException { + return BigQueryWriteSettings.create(BigQueryWriteStubSettings + .newBuilder() + .setCredentialsProvider(credentialsProvider) + .build()); + } + + @Bean + public GoogleBigQuerySenderTargetResolver bigQuerySenderTargetResolver() { + return new GoogleBigQuerySenderTargetResolver(); + } + + @Bean + public GoogleBigQueryJsonMessageTransformer jsonBigQueryMessageTransformer() { + return new GoogleBigQueryJsonMessageTransformer(); + } + + @Bean + public GoogleBigQueryAvroMessageTransformer avroGoogleBigQueryMessageTransformer() { + return new GoogleBigQueryAvroMessageTransformer(); + } + + @Bean + public GoogleBigQueryJsonDataWriterPool jsonDataWriterPool(GoogleBigQueryJsonStreamWriterFactory factory) { + return new GoogleBigQueryJsonDataWriterPool(factory); + } + + @Bean + public GoogleBigQueryAvroDataWriterPool avroDataWriterPool(GoogleBigQueryAvroStreamWriterFactory factory) { + return new GoogleBigQueryAvroDataWriterPool(factory); + } + + @Bean + public GoogleBigQueryAvroToProtoConverter avroToProtoConverter() { + return new GoogleBigQueryAvroToProtoConverter(); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClient.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClient.java new file mode 100644 index 0000000000..fb80db3d95 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClient.java @@ -0,0 +1,13 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender; + +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public interface SenderClient { + + void publish(T message, CompletableFuture resultFuture) + throws IOException, ExecutionException, InterruptedException; + + void shutdown(); +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClientsPool.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClientsPool.java new file mode 100644 index 0000000000..eecfa7c0ab --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderClientsPool.java @@ -0,0 +1,48 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public abstract class SenderClientsPool { + + private static final Logger logger = LoggerFactory.getLogger(SenderClientsPool.class); + + private final Map clients = new HashMap<>(); + private final Map counters = new HashMap<>(); + + public synchronized C acquire(T resolvedTarget) throws IOException { + C client = clients.get(resolvedTarget); + if (client == null) { + client = createClient(resolvedTarget); + } + clients.put(resolvedTarget, client); + Integer counter = counters.getOrDefault(resolvedTarget, 0); + counters.put(resolvedTarget, ++counter); + return client; + } + + public synchronized void release(T resolvedTarget) { + Integer counter = counters.getOrDefault(resolvedTarget, 0); + if (counter == 0) { + logger.warn("Attempt to release client that is not acquired"); + } else if (counter == 1) { + counters.remove(resolvedTarget); + C client = clients.remove(resolvedTarget); + client.shutdown(); + } else if (counter > 1) { + counters.put(resolvedTarget, --counter); + } + } + + public synchronized void shutdown() { + clients.values().forEach(SenderClient::shutdown); + clients.clear(); + counters.clear(); + } + + protected abstract C createClient(T resolvedTarget) throws IOException; +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderTarget.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderTarget.java new file mode 100644 index 0000000000..a17ea6ca4b --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SenderTarget.java @@ -0,0 +1,4 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender; + +public interface SenderTarget { +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryAppendCompleteCallback.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryAppendCompleteCallback.java new file mode 100644 index 0000000000..bdb29827eb --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryAppendCompleteCallback.java @@ -0,0 +1,29 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import com.google.api.core.ApiFutureCallback; +import com.google.cloud.bigquery.storage.v1.AppendRowsResponse; +import com.google.cloud.bigquery.storage.v1.Exceptions; +import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSendingResult; + +import java.util.Objects; +import java.util.concurrent.CompletableFuture; + +public class GoogleBigQueryAppendCompleteCallback implements ApiFutureCallback { + + private final CompletableFuture resultFuture; + + public GoogleBigQueryAppendCompleteCallback(CompletableFuture resultFuture) { + this.resultFuture = resultFuture; + } + + @Override + public void onFailure(Throwable t) { + Exceptions.StorageException storageException = Exceptions.toStorageException(t); + resultFuture.complete(MessageSendingResult.failedResult(Objects.requireNonNullElse(storageException, t))); + } + + @Override + public void onSuccess(AppendRowsResponse result) { + resultFuture.complete(MessageSendingResult.succeededResult()); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryDataWriter.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryDataWriter.java new file mode 100644 index 0000000000..f4e8db1076 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryDataWriter.java @@ -0,0 +1,57 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.cloud.bigquery.storage.v1.AppendRowsResponse; +import com.google.cloud.bigquery.storage.v1.Exceptions; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Descriptors; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSendingResult; +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderClient; + +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public abstract class GoogleBigQueryDataWriter< + T, + S extends AutoCloseable, + F extends GoogleBigQueryStreamWriterFactory> implements SenderClient { + + private static final Logger logger = LoggerFactory.getLogger(GoogleBigQueryDataWriter.class); + + protected final S streamWriter; + + public GoogleBigQueryDataWriter(String streamName, F factory) { + streamWriter = factory.getWriterForStream(streamName); + } + + protected abstract ApiFuture append(T message) throws Descriptors.DescriptorValidationException, IOException; + protected abstract String getWriterId(); + protected abstract String getStreamName(); + + @Override + public void publish(T message, CompletableFuture resultFuture) throws IOException, ExecutionException, InterruptedException { + try { + ApiFuture appendFuture = append(message); + ApiFutures.addCallback(appendFuture, new GoogleBigQueryAppendCompleteCallback(resultFuture), MoreExecutors.directExecutor()); + } catch (Exceptions.AppendSerializationError e) { + logger.warn("Writer {} has failed to append rows to stream {}", getWriterId(), getStreamName(), e); + resultFuture.complete(MessageSendingResult.failedResult(new GoogleBigQueryFailedAppendException(e))); + } catch (Exception e) { + logger.warn("Writer {} has failed to append rows to stream {}", getWriterId(), getStreamName(), e); + resultFuture.complete(MessageSendingResult.failedResult(e)); + } + } + + @Override + public void shutdown() { + try { + streamWriter.close(); + } catch (Exception e) { + logger.error("Error during closing stream writer of id {} and name {}", getWriterId(), getStreamName()); + } + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryFailedAppendException.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryFailedAppendException.java new file mode 100644 index 0000000000..3959f161b4 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryFailedAppendException.java @@ -0,0 +1,10 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import com.google.cloud.bigquery.storage.v1.Exceptions; + +public class GoogleBigQueryFailedAppendException extends RuntimeException { + + public GoogleBigQueryFailedAppendException(Exceptions.AppendSerializtionError cause) { + super(String.join("\n", cause.getRowIndexToErrorMessage().values()), cause); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProvider.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProvider.java new file mode 100644 index 0000000000..5ccaf40eca --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProvider.java @@ -0,0 +1,70 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import com.google.common.collect.ImmutableSet; +import pl.allegro.tech.hermes.api.ContentType; +import pl.allegro.tech.hermes.api.Subscription; +import pl.allegro.tech.hermes.consumers.consumer.ResilientMessageSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.CompletableFutureAwareMessageSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.ProtocolMessageSenderProvider; +import pl.allegro.tech.hermes.consumers.consumer.sender.SingleRecipientMessageSenderAdapter; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroDataWriterPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroMessageTransformer; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonDataWriterPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonMessageTransformer; + +import java.util.Set; + +public class GoogleBigQueryMessageSenderProvider implements ProtocolMessageSenderProvider { + + public static final String SUPPORTED_PROTOCOL = "googlebigquery"; + + private final GoogleBigQuerySenderTargetResolver targetResolver; + private final GoogleBigQueryJsonMessageTransformer jsonMessageTransformer; + private final GoogleBigQueryAvroMessageTransformer avroMessageTransformer; + private final GoogleBigQueryAvroDataWriterPool avroDataWriterPool; + private final GoogleBigQueryJsonDataWriterPool jsonDataWriterPool; + + public GoogleBigQueryMessageSenderProvider(GoogleBigQuerySenderTargetResolver targetResolver, + GoogleBigQueryJsonMessageTransformer jsonMessageTransformer, + GoogleBigQueryAvroMessageTransformer avroMessageTransformer, + GoogleBigQueryJsonDataWriterPool jsonDataWriterPool, + GoogleBigQueryAvroDataWriterPool avroDataWriterPool) { + this.targetResolver = targetResolver; + this.jsonMessageTransformer = jsonMessageTransformer; + this.jsonDataWriterPool = jsonDataWriterPool; + this.avroMessageTransformer = avroMessageTransformer; + this.avroDataWriterPool = avroDataWriterPool; + } + + @Override + public MessageSender create(Subscription subscription, ResilientMessageSender resilientMessageSender) { + GoogleBigQuerySenderTarget target = targetResolver.resolve(subscription.getEndpoint()); + CompletableFutureAwareMessageSender sender; + if (subscription.getContentType().equals(ContentType.JSON)) { + sender = new GoogleBigQueryJsonSender(jsonMessageTransformer, target, jsonDataWriterPool); + } else { + sender = new GoogleBigQueryAvroSender(avroMessageTransformer, target, avroDataWriterPool); + } + + return new SingleRecipientMessageSenderAdapter(sender, resilientMessageSender); + } + + @Override + public Set getSupportedProtocols() { + return ImmutableSet.of(SUPPORTED_PROTOCOL); + } + + @Override + public void start() throws Exception { + + } + + @Override + public void stop() throws Exception { + jsonDataWriterPool.shutdown(); + avroDataWriterPool.shutdown(); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageTransformer.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageTransformer.java new file mode 100644 index 0000000000..b5663ba56e --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageTransformer.java @@ -0,0 +1,9 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import org.json.JSONObject; +import pl.allegro.tech.hermes.consumers.consumer.Message; + +public interface GoogleBigQueryMessageTransformer { + + T fromHermesMessage(Message message); +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTarget.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTarget.java new file mode 100644 index 0000000000..d6850f0383 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTarget.java @@ -0,0 +1,49 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import com.google.cloud.bigquery.storage.v1.TableName; +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderTarget; + +import java.util.Objects; + +public class GoogleBigQuerySenderTarget implements SenderTarget { + + private final TableName tableName; + + private GoogleBigQuerySenderTarget(TableName tableName) { + this.tableName = tableName; + } + + public TableName getTableName() { + return tableName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GoogleBigQuerySenderTarget that = (GoogleBigQuerySenderTarget) o; + return Objects.equals(tableName, that.tableName); + } + + @Override + public int hashCode() { + return Objects.hash(tableName); + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static class Builder { + private TableName tableName; + + public Builder withTableName(TableName tableName) { + this.tableName = tableName; + return this; + } + + public GoogleBigQuerySenderTarget build() { + return new GoogleBigQuerySenderTarget(tableName); + } + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolver.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolver.java new file mode 100644 index 0000000000..927ad9de2f --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolver.java @@ -0,0 +1,45 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +import com.google.cloud.bigquery.storage.v1.TableName; +import com.google.common.base.Preconditions; +import pl.allegro.tech.hermes.api.EndpointAddress; +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderTarget; + +import java.net.URI; + +public class GoogleBigQuerySenderTargetResolver { + + public static final String GOOGLE_BQ_PROTOCOL = "googlebigquery"; + + private static final String HOST = "projects"; + + GoogleBigQuerySenderTarget resolve(EndpointAddress endpointAddress) { + try { + final URI endpointUri = URI.create(endpointAddress.getRawEndpoint()); + + System.out.println(); + System.out.println(); + System.out.println(); + System.out.println("scheme: " + endpointUri.getScheme()); + System.out.println("host: " + endpointUri.getHost()); + System.out.println("port: " + endpointUri.getPort()); + System.out.println("path: " + endpointUri.getPath()); + System.out.println(); + System.out.println(); + System.out.println(); + + Preconditions.checkArgument(endpointUri.getScheme().equals(GOOGLE_BQ_PROTOCOL)); + Preconditions.checkArgument(endpointUri.getHost().equals(HOST)); + Preconditions.checkArgument(endpointUri.getPort() <= 0); + final String tableNamePath = endpointUri.getHost() + endpointUri.getPath(); + + final TableName tableName = TableName.parse(tableNamePath); + + return GoogleBigQuerySenderTarget.newBuilder() + .withTableName(tableName) + .build(); + } catch (IllegalArgumentException e) { + throw new IllegalArgumentException("Given endpoint is invalid", e); + } + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryStreamWriterFactory.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryStreamWriterFactory.java new file mode 100644 index 0000000000..602e1131a1 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryStreamWriterFactory.java @@ -0,0 +1,6 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery; + +public interface GoogleBigQueryStreamWriterFactory { + + T getWriterForStream(String streamName); +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriter.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriter.java new file mode 100644 index 0000000000..d9a1441956 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriter.java @@ -0,0 +1,34 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro; + +import com.google.api.core.ApiFuture; +import com.google.cloud.bigquery.storage.v1.AppendRowsResponse; +import com.google.cloud.bigquery.storage.v1.SchemaAwareStreamWriter; +import com.google.protobuf.Descriptors; +import org.apache.avro.generic.GenericRecord; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQueryDataWriter; + +import java.io.IOException; +import java.util.Collections; + +public class GoogleBigQueryAvroDataWriter extends GoogleBigQueryDataWriter, GoogleBigQueryAvroStreamWriterFactory> { + + + public GoogleBigQueryAvroDataWriter(String streamName, GoogleBigQueryAvroStreamWriterFactory factory) { + super(streamName, factory); + } + + @Override + protected ApiFuture append(GenericRecord message) throws Descriptors.DescriptorValidationException, IOException { + return streamWriter.append(Collections.singletonList(message)); + } + + @Override + protected String getWriterId() { + return streamWriter.getWriterId(); + } + + @Override + protected String getStreamName() { + return streamWriter.getStreamName(); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriterPool.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriterPool.java new file mode 100644 index 0000000000..d9ec671ac8 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroDataWriterPool.java @@ -0,0 +1,20 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro; + +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderClientsPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQuerySenderTarget; + +import java.io.IOException; + +public class GoogleBigQueryAvroDataWriterPool extends SenderClientsPool { + + private final GoogleBigQueryAvroStreamWriterFactory factory; + + public GoogleBigQueryAvroDataWriterPool(GoogleBigQueryAvroStreamWriterFactory factory) { + this.factory = factory; + } + + @Override + protected GoogleBigQueryAvroDataWriter createClient(GoogleBigQuerySenderTarget resolvedTarget) throws IOException { + return new GoogleBigQueryAvroDataWriter(resolvedTarget.getTableName().toString(), factory); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroMessageTransformer.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroMessageTransformer.java new file mode 100644 index 0000000000..1aa534c527 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroMessageTransformer.java @@ -0,0 +1,19 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro; + +import com.google.common.base.Preconditions; +import org.apache.avro.generic.GenericRecord; +import pl.allegro.tech.hermes.api.ContentType; +import pl.allegro.tech.hermes.common.message.converter.AvroRecordToBytesConverter; +import pl.allegro.tech.hermes.consumers.consumer.Message; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQueryMessageTransformer; + +public class GoogleBigQueryAvroMessageTransformer implements GoogleBigQueryMessageTransformer { + @Override + public GenericRecord fromHermesMessage(Message message) { + + Preconditions.checkArgument(message.getContentType().equals(ContentType.AVRO)); + Preconditions.checkArgument(message.getSchema().isPresent()); + + return AvroRecordToBytesConverter.bytesToRecord(message.getData(), message.getSchema().get().getSchema()); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroSender.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroSender.java new file mode 100644 index 0000000000..38dce636ba --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroSender.java @@ -0,0 +1,43 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro; + +import org.apache.avro.generic.GenericRecord; +import pl.allegro.tech.hermes.consumers.consumer.Message; +import pl.allegro.tech.hermes.consumers.consumer.sender.CompletableFutureAwareMessageSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSendingResult; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQuerySenderTarget; + +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class GoogleBigQueryAvroSender implements CompletableFutureAwareMessageSender { + + private final GoogleBigQueryAvroMessageTransformer avroMessageTransformer; + private final GoogleBigQuerySenderTarget target; + private final GoogleBigQueryAvroDataWriterPool avroDataWriterPool; + + public GoogleBigQueryAvroSender(GoogleBigQueryAvroMessageTransformer avroMessageTransformer, + GoogleBigQuerySenderTarget target, + GoogleBigQueryAvroDataWriterPool avroDataWriterPool) { + + this.avroMessageTransformer = avroMessageTransformer; + this.target = target; + this.avroDataWriterPool = avroDataWriterPool; + } + + @Override + public void send(Message message, CompletableFuture resultFuture) { + GenericRecord record = avroMessageTransformer.fromHermesMessage(message); + + try { + avroDataWriterPool.acquire(target).publish(record, resultFuture); + } catch (IOException | ExecutionException | InterruptedException e) { + resultFuture.complete(MessageSendingResult.failedResult(e)); + } + } + + @Override + public void stop() { + avroDataWriterPool.shutdown(); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroStreamWriterFactory.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroStreamWriterFactory.java new file mode 100644 index 0000000000..ff0573bc42 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroStreamWriterFactory.java @@ -0,0 +1,57 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro; + +import com.google.api.gax.batching.FlowControlSettings; +import com.google.api.gax.core.CredentialsProvider; +import com.google.api.gax.core.FixedExecutorProvider; +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.auth.Credentials; +import com.google.cloud.bigquery.storage.v1.BigQueryWriteClient; +import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings; +import com.google.cloud.bigquery.storage.v1.SchemaAwareStreamWriter; +import com.google.protobuf.Descriptors; +import org.apache.avro.generic.GenericRecord; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.threeten.bp.Duration; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQueryStreamWriterFactory; + +import java.io.IOException; +import java.util.concurrent.Executors; + +@Component +public class GoogleBigQueryAvroStreamWriterFactory implements GoogleBigQueryStreamWriterFactory> { + + private static final Logger logger = LoggerFactory.getLogger(GoogleBigQueryAvroStreamWriterFactory.class); + + private final Credentials credentials; + private final BigQueryWriteClient writeClient; + private final GoogleBigQueryAvroToProtoConverter avroToProtoConverter; + + public GoogleBigQueryAvroStreamWriterFactory(CredentialsProvider credentialsProvider, + BigQueryWriteSettings writeSettings, + GoogleBigQueryAvroToProtoConverter avroToProtoConverter) throws IOException { + this.credentials = credentialsProvider.getCredentials(); + this.writeClient = BigQueryWriteClient.create(writeSettings); + this.avroToProtoConverter = avroToProtoConverter; + } + + public SchemaAwareStreamWriter getWriterForStream(String streamName) { + try { + return SchemaAwareStreamWriter.newBuilder(streamName, writeClient, avroToProtoConverter) + .setEnableConnectionPool(true) + .setExecutorProvider(FixedExecutorProvider.create(Executors.newScheduledThreadPool(100))) + .setFlowControlSettings(FlowControlSettings.newBuilder().build()) + .setChannelProvider(BigQueryWriteSettings.defaultGrpcTransportProviderBuilder() + .setCredentials(credentials) + .setKeepAliveTime(Duration.ofMinutes(1)) + .setKeepAliveWithoutCalls(true) + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(2)) + .build() + ).build(); + } catch (Descriptors.DescriptorValidationException | IOException | InterruptedException e) { + logger.warn("Cannot create SchemaAwareStreamWriter for stream {}", streamName, e); + throw new RuntimeException(e); + } + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java new file mode 100644 index 0000000000..be43e20f20 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java @@ -0,0 +1,85 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro; + +import com.google.cloud.bigquery.storage.v1.TableSchema; +import com.google.cloud.bigquery.storage.v1.ToProtoConverter; +import com.google.protobuf.ByteString; +import com.google.protobuf.Descriptors; +import com.google.protobuf.DynamicMessage; +import org.apache.avro.generic.GenericRecord; + +import java.math.BigInteger; +import java.nio.ByteBuffer; +import java.util.Map; + +public class GoogleBigQueryAvroToProtoConverter implements ToProtoConverter { + @Override + public DynamicMessage convertToProtoMessage(Descriptors.Descriptor protoSchema, TableSchema tableSchema, GenericRecord inputObject, boolean ignoreUnknownFields) { + return createMessage(protoSchema, inputObject); + } + + private DynamicMessage createMessage(Descriptors.Descriptor protoSchema, GenericRecord inputObject) { + DynamicMessage.Builder messageBuilder = DynamicMessage.newBuilder(protoSchema); + + protoSchema.getFields().forEach(field -> { + String fieldName = field.getName(); + Object fieldValue = inputObject.get(fieldName); + + if (fieldValue != null) { + if (field.isRepeated()) { + if (!(fieldValue instanceof Map)) { + for (Object el : (Iterable) fieldValue) { + messageBuilder.addRepeatedField(field, toProtobufValue(field, el)); + } + } else { + for (Map.Entry el: ((Map) fieldValue).entrySet()) { + DynamicMessage.Builder entryBuilder = DynamicMessage.newBuilder(field.getMessageType()); + entryBuilder.setField(field.getMessageType().findFieldByName("key"), el.getKey().toString()); + entryBuilder.setField(field.getMessageType().findFieldByName("value"), el.getValue().toString()); + messageBuilder.addRepeatedField(field, entryBuilder.build()); + } + } + } else { + messageBuilder.setField(field, toProtobufValue(field, fieldValue)); + } + } + }); + + return messageBuilder.build(); + } + + private Object toProtobufValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) { + switch (fieldDescriptor.getType()) { + case INT32: + case SINT32: + case SFIXED32: + case INT64: + case SINT64: + case SFIXED64: + case BOOL: + case FLOAT: + case DOUBLE: + return value; + case STRING: + return value.toString(); + case ENUM: + Descriptors.EnumDescriptor enumDescriptor = fieldDescriptor.getEnumType(); + return enumDescriptor.findValueByName((String) value); + case FIXED64: + case UINT64: + BigInteger bigInt = (BigInteger) value; + return bigInt.longValue(); + case BYTES: + ByteBuffer byteBuffer = (ByteBuffer) value; + return ByteString.copyFrom(byteBuffer); + case FIXED32: + case UINT32: + return ((Long) value).intValue(); + case MESSAGE: + Descriptors.Descriptor messageDescriptor = fieldDescriptor.getMessageType(); + GenericRecord fieldValue = (GenericRecord) value; + return createMessage(messageDescriptor, fieldValue); + default: + throw new RuntimeException("Unsupported field type: " + fieldDescriptor.getType()); + } + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriter.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriter.java new file mode 100644 index 0000000000..d5accc91dd --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriter.java @@ -0,0 +1,32 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json; + +import com.google.api.core.ApiFuture; +import com.google.cloud.bigquery.storage.v1.AppendRowsResponse; +import com.google.cloud.bigquery.storage.v1.JsonStreamWriter; +import com.google.protobuf.Descriptors; +import org.json.JSONArray; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQueryDataWriter; + +import java.io.IOException; + +public class GoogleBigQueryJsonDataWriter extends GoogleBigQueryDataWriter { + + public GoogleBigQueryJsonDataWriter(String streamName, GoogleBigQueryJsonStreamWriterFactory factory) { + super(streamName, factory); + } + + @Override + protected ApiFuture append(JSONArray message) throws Descriptors.DescriptorValidationException, IOException { + return streamWriter.append(message); + } + + @Override + protected String getWriterId() { + return streamWriter.getWriterId(); + } + + @Override + protected String getStreamName() { + return streamWriter.getStreamName(); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriterPool.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriterPool.java new file mode 100644 index 0000000000..02655cf909 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonDataWriterPool.java @@ -0,0 +1,18 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json; + +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderClientsPool; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQuerySenderTarget; + +public class GoogleBigQueryJsonDataWriterPool extends SenderClientsPool { + + private final GoogleBigQueryJsonStreamWriterFactory streamWriterFactory; + + public GoogleBigQueryJsonDataWriterPool(GoogleBigQueryJsonStreamWriterFactory streamWriterFactory) { + this.streamWriterFactory = streamWriterFactory; + } + + @Override + protected GoogleBigQueryJsonDataWriter createClient(GoogleBigQuerySenderTarget resolvedTarget) { + return new GoogleBigQueryJsonDataWriter(resolvedTarget.getTableName().toString(), streamWriterFactory); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformer.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformer.java new file mode 100644 index 0000000000..29efad3c63 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformer.java @@ -0,0 +1,19 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json; + +import autovalue.shaded.kotlin.text.Charsets; +import com.google.common.base.Preconditions; +import org.json.JSONObject; +import org.json.JSONTokener; +import pl.allegro.tech.hermes.api.ContentType; +import pl.allegro.tech.hermes.consumers.consumer.Message; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQueryMessageTransformer; + +public class GoogleBigQueryJsonMessageTransformer implements GoogleBigQueryMessageTransformer { + @Override + public JSONObject fromHermesMessage(Message message) { + Preconditions.checkArgument(message.getContentType().equals(ContentType.JSON)); + + String jsonString = new String(message.getData(), Charsets.UTF_8); + return new JSONObject(new JSONTokener(jsonString)); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonSender.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonSender.java new file mode 100644 index 0000000000..d85e23326a --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonSender.java @@ -0,0 +1,44 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json; + +import org.json.JSONArray; +import org.json.JSONObject; +import pl.allegro.tech.hermes.consumers.consumer.Message; +import pl.allegro.tech.hermes.consumers.consumer.sender.CompletableFutureAwareMessageSender; +import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSendingResult; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQuerySenderTarget; + +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class GoogleBigQueryJsonSender implements CompletableFutureAwareMessageSender { + + private final GoogleBigQueryJsonMessageTransformer messageTransformer; + private final GoogleBigQuerySenderTarget senderTarget; + private final GoogleBigQueryJsonDataWriterPool dataWriterPool; + + public GoogleBigQueryJsonSender(GoogleBigQueryJsonMessageTransformer messageTransformer, GoogleBigQuerySenderTarget senderTarget, GoogleBigQueryJsonDataWriterPool dataWriterPool) { + this.messageTransformer = messageTransformer; + this.senderTarget = senderTarget; + this.dataWriterPool = dataWriterPool; + } + + @Override + public void send(Message message, CompletableFuture resultFuture) { + JSONObject jsonObject = messageTransformer.fromHermesMessage(message); + final JSONArray data = new JSONArray(); + data.put(jsonObject); + + try { + dataWriterPool.acquire(senderTarget) + .publish(data, resultFuture); + } catch (IOException | ExecutionException | InterruptedException e) { + resultFuture.complete(MessageSendingResult.failedResult(e)); + } + } + + @Override + public void stop() { + dataWriterPool.shutdown(); + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java new file mode 100644 index 0000000000..c0f9137c87 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java @@ -0,0 +1,52 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json; + +import com.google.api.gax.batching.FlowControlSettings; +import com.google.api.gax.core.CredentialsProvider; +import com.google.api.gax.core.FixedExecutorProvider; +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.auth.Credentials; +import com.google.cloud.bigquery.storage.v1.BigQueryWriteClient; +import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings; +import com.google.cloud.bigquery.storage.v1.JsonStreamWriter; +import com.google.protobuf.Descriptors; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.threeten.bp.Duration; +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.GoogleBigQueryStreamWriterFactory; + +import java.io.IOException; +import java.util.concurrent.Executors; + +@Component +public class GoogleBigQueryJsonStreamWriterFactory implements GoogleBigQueryStreamWriterFactory { + + private static final Logger logger = LoggerFactory.getLogger(GoogleBigQueryJsonDataWriter.class); + + private final Credentials credentials; + private final BigQueryWriteClient writeClient; + + public GoogleBigQueryJsonStreamWriterFactory(CredentialsProvider credentials, BigQueryWriteSettings writeSettings) throws IOException { + this.credentials = credentials.getCredentials(); + this.writeClient = BigQueryWriteClient.create(writeSettings); + } + + public JsonStreamWriter getWriterForStream(String stream) { + try { + return JsonStreamWriter.newBuilder(stream, writeClient) + .setEnableConnectionPool(true) + .setExecutorProvider(FixedExecutorProvider.create(Executors.newScheduledThreadPool(100))) + .setFlowControlSettings(FlowControlSettings.newBuilder().build()) + .setChannelProvider(BigQueryWriteSettings.defaultGrpcTransportProviderBuilder() + .setCredentials(credentials) + .setKeepAliveTime(Duration.ofMinutes(1)) + .setKeepAliveWithoutCalls(true) + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(2)) + .build()) + .build(); + } catch (Descriptors.DescriptorValidationException | IOException | InterruptedException e) { + logger.warn("Cannot create JsonStreamWriter for stream {}", stream, e); + throw new RuntimeException(e); + } + } +} diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClient.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClient.java index aeb77eeb17..ec7092c76d 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClient.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClient.java @@ -8,13 +8,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSendingResult; +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderClient; import java.io.IOException; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -class GooglePubSubClient { +class GooglePubSubClient implements SenderClient { private static final Logger logger = LoggerFactory.getLogger(GooglePubSubClient.class); @@ -24,13 +25,15 @@ class GooglePubSubClient { this.publisher = publisher; } - void publish(PubsubMessage pubsubMessage, CompletableFuture resultFuture) + @Override + public void publish(PubsubMessage pubsubMessage, CompletableFuture resultFuture) throws IOException, ExecutionException, InterruptedException { ApiFuture future = publisher.publish(pubsubMessage); ApiFutures.addCallback(future, new GooglePubSubMessageSentCallback(resultFuture), MoreExecutors.directExecutor()); } - void shutdown() { + @Override + public void shutdown() { publisher.shutdown(); try { publisher.awaitTermination(30, TimeUnit.SECONDS); diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClientsPool.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClientsPool.java index aa4e1f0aba..19d94d6f55 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClientsPool.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubClientsPool.java @@ -6,23 +6,16 @@ import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.cloud.pubsub.v1.Publisher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderClientsPool; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -class GooglePubSubClientsPool { - private static final Logger logger = LoggerFactory.getLogger(GooglePubSubClientsPool.class); +class GooglePubSubClientsPool extends SenderClientsPool { private final CredentialsProvider credentialsProvider; private final ExecutorProvider publishingExecutorProvider; private final RetrySettings retrySettings; private final BatchingSettings batchingSettings; - private final Map clients = new HashMap<>(); - private final Map counters = new HashMap<>(); - private final TransportChannelProvider transportChannelProvider; GooglePubSubClientsPool(CredentialsProvider credentialsProvider, @@ -37,36 +30,6 @@ class GooglePubSubClientsPool { this.transportChannelProvider = transportChannelProvider; } - synchronized GooglePubSubClient acquire(GooglePubSubSenderTarget resolvedTarget) throws IOException { - GooglePubSubClient client = clients.get(resolvedTarget); - if (client == null) { - client = createClient(resolvedTarget); - } - clients.put(resolvedTarget, client); - Integer counter = counters.getOrDefault(resolvedTarget, 0); - counters.put(resolvedTarget, ++counter); - return client; - } - - synchronized void release(GooglePubSubSenderTarget resolvedTarget) { - Integer counter = counters.getOrDefault(resolvedTarget, 0); - if (counter == 0) { - logger.warn("Attempt to release GooglePubSubClient that is not acquired"); - } else if (counter == 1) { - counters.remove(resolvedTarget); - GooglePubSubClient client = clients.remove(resolvedTarget); - client.shutdown(); - } else if (counter > 1) { - counters.put(resolvedTarget, --counter); - } - } - - synchronized void shutdown() { - clients.values().forEach(GooglePubSubClient::shutdown); - clients.clear(); - counters.clear(); - } - protected GooglePubSubClient createClient(GooglePubSubSenderTarget resolvedTarget) throws IOException { final Publisher.Builder builder = Publisher.newBuilder(resolvedTarget.getTopicName()) .setEndpoint(resolvedTarget.getPubSubEndpoint()) diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubSenderTarget.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubSenderTarget.java index 4a179d8ac2..8fa8ccfa4d 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubSenderTarget.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlepubsub/GooglePubSubSenderTarget.java @@ -1,10 +1,11 @@ package pl.allegro.tech.hermes.consumers.consumer.sender.googlepubsub; import com.google.pubsub.v1.TopicName; +import pl.allegro.tech.hermes.consumers.consumer.sender.SenderTarget; import java.util.Objects; -class GooglePubSubSenderTarget { +class GooglePubSubSenderTarget implements SenderTarget { private final TopicName topicName; private final String pubSubEndpoint; diff --git a/hermes-management/src/main/java/pl/allegro/tech/hermes/management/domain/subscription/validator/EndpointAddressFormatValidator.java b/hermes-management/src/main/java/pl/allegro/tech/hermes/management/domain/subscription/validator/EndpointAddressFormatValidator.java index 52fca17e35..53e60b732a 100644 --- a/hermes-management/src/main/java/pl/allegro/tech/hermes/management/domain/subscription/validator/EndpointAddressFormatValidator.java +++ b/hermes-management/src/main/java/pl/allegro/tech/hermes/management/domain/subscription/validator/EndpointAddressFormatValidator.java @@ -22,6 +22,7 @@ public EndpointAddressFormatValidator(List additionalEndpointProtocols) this.availableProtocol.add("https"); this.availableProtocol.add("jms"); this.availableProtocol.add("googlepubsub"); + this.availableProtocol.add("googlebigquery"); } @Override From 92ca69e4a2fb6389dedeb8ec1f069357cd52eb5d Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 20 Aug 2024 10:05:42 +0200 Subject: [PATCH 2/4] bigquery-sender : Actualization of .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index d085ce8969..127f476bf3 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,7 @@ scripts/lib/ scripts/pip-selfcheck.json .DS_Store +.bloop +.metals +.vim +bin From 8705c40ffc6e9a66adccc6343d253c3ea05a0983 Mon Sep 17 00:00:00 2001 From: Adam Szorcz <87751153+adamallegro@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:02:26 +0200 Subject: [PATCH 3/4] TANGO-2124-unit-tests : Stable unit tests (#1895) --- .../SingleRecipientMessageSenderAdapter.java | 4 + ...GoogleBigQueryJsonStreamWriterFactory.java | 4 +- ...GoogleBigQueryJsonWriteClientProvider.java | 19 +++++ ...leBigQueryMessageSenderProviderTest.groovy | 76 +++++++++++++++++++ ...gleBigQuerySenderTargetResolverTest.groovy | 40 ++++++++++ .../GoogleBigQuerySenderTargetTest.groovy | 18 +++++ ...eBigQueryJsonMessageTransformerTest.groovy | 59 ++++++++++++++ 7 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonWriteClientProvider.java create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProviderTest.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolverTest.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetTest.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformerTest.groovy diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SingleRecipientMessageSenderAdapter.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SingleRecipientMessageSenderAdapter.java index 47b8dd0c77..39564cfde8 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SingleRecipientMessageSenderAdapter.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/SingleRecipientMessageSenderAdapter.java @@ -17,6 +17,10 @@ public SingleRecipientMessageSenderAdapter(CompletableFutureAwareMessageSender a this.adaptee = adaptee; } + public CompletableFutureAwareMessageSender getAdaptee() { + return adaptee; + } + @Override public CompletableFuture send(Message message) { return resilientMessageSender.send( diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java index c0f9137c87..30d6329d8a 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonStreamWriterFactory.java @@ -26,9 +26,9 @@ public class GoogleBigQueryJsonStreamWriterFactory implements GoogleBigQueryStre private final Credentials credentials; private final BigQueryWriteClient writeClient; - public GoogleBigQueryJsonStreamWriterFactory(CredentialsProvider credentials, BigQueryWriteSettings writeSettings) throws IOException { + public GoogleBigQueryJsonStreamWriterFactory(CredentialsProvider credentials, GoogleBigQueryJsonWriteClientProvider writeClientProvider) throws IOException { this.credentials = credentials.getCredentials(); - this.writeClient = BigQueryWriteClient.create(writeSettings); + this.writeClient = writeClientProvider.getWriteClient(); } public JsonStreamWriter getWriterForStream(String stream) { diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonWriteClientProvider.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonWriteClientProvider.java new file mode 100644 index 0000000000..9c2602fa61 --- /dev/null +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonWriteClientProvider.java @@ -0,0 +1,19 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json; + +import com.google.cloud.bigquery.storage.v1.BigQueryWriteClient; +import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings; +import org.springframework.stereotype.Component; + +import java.io.IOException; + +@Component +public class GoogleBigQueryJsonWriteClientProvider { + private final BigQueryWriteSettings writeSettings; + public GoogleBigQueryJsonWriteClientProvider(BigQueryWriteSettings writeSettings) { + this.writeSettings = writeSettings; + } + + public BigQueryWriteClient getWriteClient() throws IOException { + return BigQueryWriteClient.create(this.writeSettings); + } +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProviderTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProviderTest.groovy new file mode 100644 index 0000000000..07d2928bae --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQueryMessageSenderProviderTest.groovy @@ -0,0 +1,76 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery + +import com.google.api.gax.core.NoCredentialsProvider +import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings +import pl.allegro.tech.hermes.api.ContentType +import pl.allegro.tech.hermes.api.DeliveryType +import pl.allegro.tech.hermes.api.EndpointAddress +import pl.allegro.tech.hermes.api.Subscription +import pl.allegro.tech.hermes.api.SubscriptionMode +import pl.allegro.tech.hermes.consumers.consumer.ResilientMessageSender +import pl.allegro.tech.hermes.consumers.consumer.rate.SerialConsumerRateLimiter +import pl.allegro.tech.hermes.consumers.consumer.sender.MessageSender +import pl.allegro.tech.hermes.consumers.consumer.sender.SingleRecipientMessageSenderAdapter +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroDataWriterPool +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroMessageTransformer +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroStreamWriterFactory +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroToProtoConverter +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonDataWriterPool +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonMessageTransformer +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonSender +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonStreamWriterFactory +import pl.allegro.tech.hermes.domain.CredentialsRepository +import spock.lang.Specification + +class GoogleBigQueryMessageSenderProviderTest extends Specification { + def 'should create sender provider'() { + given: + GoogleBigQueryMessageSenderProvider provider = new GoogleBigQueryMessageSenderProvider( + Mock(GoogleBigQuerySenderTargetResolver), + Mock(GoogleBigQueryJsonMessageTransformer), + Mock(GoogleBigQueryAvroMessageTransformer), + Mock(GoogleBigQueryJsonDataWriterPool), + Mock(GoogleBigQueryAvroDataWriterPool) + ) + + EndpointAddress endpointAddress = EndpointAddress.of("googlebigquery://projects/project/datasets/dataset/tables/table") + Subscription subscription = Subscription.create("pl.allegro.group.topicname", + "subscription", + endpointAddress, + Subscription.State.PENDING, + "test", + Map.of(), + false, + null, + null, + null, + contentType, + DeliveryType.SERIAL, + [], + SubscriptionMode.ANYCAST, + [], + null, + null, + false, + false, + 0, + false, + false + ) + + ResilientMessageSender resilientMessageSender = Mock(ResilientMessageSender) + + when: + + MessageSender sender = provider.create(subscription, resilientMessageSender) + + + then: + (sender as SingleRecipientMessageSenderAdapter).getAdaptee().getClass().name == adapteeClassName + + where: + contentType || adapteeClassName + ContentType.JSON || "pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json.GoogleBigQueryJsonSender" + ContentType.AVRO || "pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroSender" + } +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolverTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolverTest.groovy new file mode 100644 index 0000000000..2240c3d42b --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetResolverTest.groovy @@ -0,0 +1,40 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery + +import com.google.cloud.bigquery.storage.v1.TableName +import pl.allegro.tech.hermes.api.EndpointAddress +import spock.lang.Specification + +class GoogleBigQuerySenderTargetResolverTest extends Specification { + def 'should resolve endpoint address'() { + + given: + EndpointAddress endpointAddress = EndpointAddress.of("googlebigquery://projects/project/datasets/dataset/tables/table") + GoogleBigQuerySenderTargetResolver resolver = new GoogleBigQuerySenderTargetResolver() + + TableName expected = TableName.of("project", "dataset", "table") + + + + when: + GoogleBigQuerySenderTarget target = resolver.resolve(endpointAddress) + + then: + target.getTableName().project == expected.project + target.getTableName().dataset == expected.dataset + target.getTableName().table == expected.table + } + + def 'should throw exception when endpoint address is invalid'() { + + given: + EndpointAddress endpointAddress = EndpointAddress.of("googlebigquery://projects/project/datasets/dataset/tables/table/streams/_default") + GoogleBigQuerySenderTargetResolver resolver = new GoogleBigQuerySenderTargetResolver() + + when: + resolver.resolve(endpointAddress) + + then: + thrown(IllegalArgumentException) + + } +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetTest.groovy new file mode 100644 index 0000000000..482c78627f --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/GoogleBigQuerySenderTargetTest.groovy @@ -0,0 +1,18 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery + +import com.google.cloud.bigquery.storage.v1.TableName +import spock.lang.Specification + +class GoogleBigQuerySenderTargetTest extends Specification{ + def 'should create sender target'(){ + + given: + TableName tableName = TableName.of("project", "dataset", "table") + + when: + GoogleBigQuerySenderTarget target = GoogleBigQuerySenderTarget.newBuilder().withTableName(tableName).build() + + then: + tableName == target.tableName + } +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformerTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformerTest.groovy new file mode 100644 index 0000000000..f7045aae3f --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/json/GoogleBigQueryJsonMessageTransformerTest.groovy @@ -0,0 +1,59 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.json + +import org.json.JSONException +import org.json.JSONObject +import pl.allegro.tech.hermes.api.ContentType +import pl.allegro.tech.hermes.consumers.consumer.Message +import pl.allegro.tech.hermes.consumers.test.MessageBuilder +import spock.lang.Specification + +class GoogleBigQueryJsonMessageTransformerTest extends Specification { + def 'should translate valid message to json'() { + given: + GoogleBigQueryJsonMessageTransformer transformer = new GoogleBigQueryJsonMessageTransformer() + byte[] content = "{'message': 'some text'}".bytes + String expected = "{\"message\":\"some text\"}" + Message message = MessageBuilder.withTestMessage() + .withContentType(ContentType.JSON) + .withContent(content) + .build() + + when: + JSONObject object = transformer.fromHermesMessage(message) + + then: + object.toString() == expected + } + + def 'should throw an exception when json is invalid'() { + given: + GoogleBigQueryJsonMessageTransformer transformer = new GoogleBigQueryJsonMessageTransformer() + byte[] content = "not a json".bytes + Message message = MessageBuilder.withTestMessage() + .withContentType(ContentType.JSON) + .withContent(content) + .build() + + when: + transformer.fromHermesMessage(message) + + then: + thrown(JSONException) + } + def 'should throw an exception when message is not a json'() { + given: + GoogleBigQueryJsonMessageTransformer transformer = new GoogleBigQueryJsonMessageTransformer() + byte[] content = "not a json".bytes + Message message = MessageBuilder.withTestMessage() + .withContentType(ContentType.AVRO) + .withContent(content) + .build() + + when: + transformer.fromHermesMessage(message) + + then: + thrown(IllegalArgumentException) + } +} + From 46ed8b3acb1e976927e8c2a3016a78a343110aa5 Mon Sep 17 00:00:00 2001 From: Adam Szorcz <87751153+adamallegro@users.noreply.github.com> Date: Fri, 4 Oct 2024 10:54:56 +0200 Subject: [PATCH 4/4] TANGO 2130 (#1903) * TANGO-2130 : Tests for primitive types * TANGO-2130 : Array and Map primitives - tests * TANGO-2130 : Checkpoint after primitives * TANGO-2130 : Unit tests for records and for simple type mappings * TANGO-2130 : Updated and refactored tests * TANGO-2130 : Fixes after review --- .vscode/settings.json | 3 + .../GoogleBigQueryAvroToProtoConverter.java | 95 +- .../googlebigquery/avro/AvroTrait.groovy | 14 + .../ConvertAndCastPrimitivesTest.groovy | 94 ++ .../ConvertArrayOfPrimitivesTest.groovy | 110 ++ .../conversions/ConvertPrimitivesTest.groovy | 176 +++ .../ConvertRecordWithPrimitivesTest.groovy | 62 + .../avro/descriptor/ArrayBoolProto.java | 664 +++++++++ .../avro/descriptor/ArrayBytesProto.java | 649 +++++++++ .../avro/descriptor/ArrayDoubleProto.java | 664 +++++++++ .../avro/descriptor/ArrayFloatProto.java | 664 +++++++++ .../avro/descriptor/ArrayInt32Proto.java | 667 +++++++++ .../avro/descriptor/ArrayInt64Proto.java | 667 +++++++++ .../avro/descriptor/ArrayStringProto.java | 690 +++++++++ .../avro/descriptor/BoolProto.java | 540 +++++++ .../avro/descriptor/BytesProto.java | 543 +++++++ .../avro/descriptor/DoubleProto.java | 542 +++++++ .../avro/descriptor/FloatProto.java | 541 +++++++ .../avro/descriptor/Int32Proto.java | 539 +++++++ .../avro/descriptor/Int64Proto.java | 540 +++++++ .../avro/descriptor/NBoolProto.java | 576 ++++++++ .../avro/descriptor/NBytesProto.java | 579 ++++++++ .../avro/descriptor/NDoubleProto.java | 577 ++++++++ .../avro/descriptor/NFloatProto.java | 577 ++++++++ .../avro/descriptor/NInt32Proto.java | 575 ++++++++ .../avro/descriptor/NInt64Proto.java | 576 ++++++++ .../avro/descriptor/NStringProto.java | 655 +++++++++ .../avro/descriptor/RecordBoolProto.java | 1178 +++++++++++++++ .../avro/descriptor/RecordBytesProto.java | 1182 ++++++++++++++++ .../avro/descriptor/RecordDoubleProto.java | 1180 ++++++++++++++++ .../avro/descriptor/RecordFloatProto.java | 1180 ++++++++++++++++ .../avro/descriptor/RecordInt32Proto.java | 1178 +++++++++++++++ .../avro/descriptor/RecordInt64Proto.java | 1179 +++++++++++++++ .../avro/descriptor/RecordStringProto.java | 1258 +++++++++++++++++ .../avro/descriptor/StringProto.java | 620 ++++++++ .../avro/descriptor/StringToBoolProto.java | 805 +++++++++++ .../avro/descriptor/StringToBytesProto.java | 810 +++++++++++ .../avro/descriptor/StringToDoubleProto.java | 805 +++++++++++ .../avro/descriptor/StringToFloatProto.java | 805 +++++++++++ .../avro/descriptor/StringToInt32Proto.java | 805 +++++++++++ .../avro/descriptor/StringToInt64Proto.java | 805 +++++++++++ .../avro/descriptor/StringToStringProto.java | 810 +++++++++++ .../schemas/array-primitives/boolean.avsc | 14 + .../schemas/array-primitives/bytes.avsc | 14 + .../schemas/array-primitives/double.avsc | 14 + .../schemas/array-primitives/float.avsc | 14 + .../schemas/array-primitives/int.avsc | 14 + .../schemas/array-primitives/long.avsc | 14 + .../schemas/array-primitives/string.avsc | 14 + .../schemas/default-primitives/boolean.avsc | 12 + .../schemas/default-primitives/bytes.avsc | 12 + .../schemas/default-primitives/double.avsc | 12 + .../schemas/default-primitives/float.avsc | 12 + .../schemas/default-primitives/int.avsc | 12 + .../schemas/default-primitives/long.avsc | 12 + .../schemas/default-primitives/string.avsc | 12 + .../defaults/array-with-default-items.avsc | 17 + .../schemas/defaults/array-with-default.avsc | 17 + .../schemas/defaults/enum-with-default.avsc | 19 + .../defaults/map-with-default-values.avsc | 17 + .../schemas/defaults/map-with-default.avsc | 21 + .../defaults/primitive-with-default.avsc | 12 + .../schemas/defaults/record-with-default.avsc | 23 + .../schemas/defaults/string-with-default.avsc | 12 + .../schemas/defaults/union-with-default.avsc | 14 + .../schemas/map-primitives/boolean.avsc | 14 + .../schemas/map-primitives/bytes.avsc | 14 + .../schemas/map-primitives/double.avsc | 14 + .../schemas/map-primitives/float.avsc | 14 + .../resources/schemas/map-primitives/int.avsc | 14 + .../schemas/map-primitives/long.avsc | 14 + .../schemas/map-primitives/string.avsc | 14 + .../schemas/nullable-primitives/boolean.avsc | 11 + .../schemas/nullable-primitives/bytes.avsc | 11 + .../schemas/nullable-primitives/double.avsc | 11 + .../schemas/nullable-primitives/float.avsc | 11 + .../schemas/nullable-primitives/int.avsc | 11 + .../schemas/nullable-primitives/long.avsc | 11 + .../schemas/nullable-primitives/string.avsc | 13 + .../resources/schemas/primitives/boolean.avsc | 11 + .../resources/schemas/primitives/bytes.avsc | 11 + .../resources/schemas/primitives/double.avsc | 11 + .../resources/schemas/primitives/float.avsc | 11 + .../resources/schemas/primitives/int.avsc | 11 + .../resources/schemas/primitives/long.avsc | 11 + .../resources/schemas/primitives/string.avsc | 11 + .../schemas/record-primitives/boolean.avsc | 20 + .../schemas/record-primitives/bytes.avsc | 20 + .../schemas/record-primitives/double.avsc | 20 + .../schemas/record-primitives/float.avsc | 20 + .../schemas/record-primitives/int.avsc | 20 + .../schemas/record-primitives/long.avsc | 20 + .../schemas/record-primitives/string.avsc | 20 + 93 files changed, 27879 insertions(+), 28 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/AvroTrait.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertAndCastPrimitivesTest.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertArrayOfPrimitivesTest.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertPrimitivesTest.groovy create mode 100644 hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertRecordWithPrimitivesTest.groovy create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBoolProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBytesProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayDoubleProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayFloatProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt32Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt64Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayStringProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BoolProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BytesProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/DoubleProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/FloatProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int32Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int64Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBoolProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBytesProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NDoubleProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NFloatProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt32Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt64Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NStringProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBoolProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBytesProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordDoubleProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordFloatProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt32Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt64Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordStringProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBoolProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBytesProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToDoubleProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToFloatProto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt32Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt64Proto.java create mode 100644 hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToStringProto.java create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/boolean.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/bytes.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/double.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/float.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/int.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/long.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/array-primitives/string.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/boolean.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/bytes.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/double.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/float.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/int.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/long.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/default-primitives/string.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/array-with-default-items.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/array-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/enum-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/map-with-default-values.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/map-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/primitive-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/record-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/string-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/defaults/union-with-default.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/boolean.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/bytes.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/double.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/float.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/int.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/long.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/map-primitives/string.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/boolean.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/bytes.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/double.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/float.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/int.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/long.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/nullable-primitives/string.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/boolean.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/bytes.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/double.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/float.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/int.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/long.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/primitives/string.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/boolean.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/bytes.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/double.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/float.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/int.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/long.avsc create mode 100644 hermes-consumers/src/test/resources/schemas/record-primitives/string.avsc diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..7b016a89fb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java index be43e20f20..88803c66b1 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java +++ b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/GoogleBigQueryAvroToProtoConverter.java @@ -2,9 +2,7 @@ import com.google.cloud.bigquery.storage.v1.TableSchema; import com.google.cloud.bigquery.storage.v1.ToProtoConverter; -import com.google.protobuf.ByteString; -import com.google.protobuf.Descriptors; -import com.google.protobuf.DynamicMessage; +import com.google.protobuf.*; import org.apache.avro.generic.GenericRecord; import java.math.BigInteger; @@ -14,6 +12,10 @@ public class GoogleBigQueryAvroToProtoConverter implements ToProtoConverter { @Override public DynamicMessage convertToProtoMessage(Descriptors.Descriptor protoSchema, TableSchema tableSchema, GenericRecord inputObject, boolean ignoreUnknownFields) { + return convertToProtoMessage(protoSchema, inputObject); + } + + public DynamicMessage convertToProtoMessage(Descriptors.Descriptor protoSchema, GenericRecord inputObject) { return createMessage(protoSchema, inputObject); } @@ -21,58 +23,95 @@ private DynamicMessage createMessage(Descriptors.Descriptor protoSchema, Generic DynamicMessage.Builder messageBuilder = DynamicMessage.newBuilder(protoSchema); protoSchema.getFields().forEach(field -> { - String fieldName = field.getName(); - Object fieldValue = inputObject.get(fieldName); + convertSimpleField(inputObject, field, messageBuilder); + }); + + return messageBuilder.build(); + } + + private void convertSimpleField(GenericRecord inputObject, Descriptors.FieldDescriptor field, Message.Builder messageBuilder) { + String fieldName = field.getName(); + Object fieldValue = inputObject.get(fieldName); - if (fieldValue != null) { - if (field.isRepeated()) { - if (!(fieldValue instanceof Map)) { - for (Object el : (Iterable) fieldValue) { - messageBuilder.addRepeatedField(field, toProtobufValue(field, el)); - } - } else { - for (Map.Entry el: ((Map) fieldValue).entrySet()) { - DynamicMessage.Builder entryBuilder = DynamicMessage.newBuilder(field.getMessageType()); - entryBuilder.setField(field.getMessageType().findFieldByName("key"), el.getKey().toString()); - entryBuilder.setField(field.getMessageType().findFieldByName("value"), el.getValue().toString()); - messageBuilder.addRepeatedField(field, entryBuilder.build()); - } + if (fieldValue != null) { + if (field.isRepeated()) { + if (!(fieldValue instanceof Map)) { + for (Object el : (Iterable) fieldValue) { + messageBuilder.addRepeatedField(field, toProtobufValue(field, el)); } } else { - messageBuilder.setField(field, toProtobufValue(field, fieldValue)); + for (Map.Entry el : ((Map) fieldValue).entrySet()) { + DynamicMessage.Builder entryBuilder = DynamicMessage.newBuilder(field.getMessageType()); + Descriptors.FieldDescriptor valueField = field.getMessageType().findFieldByName("value"); + entryBuilder.setField(field.getMessageType().findFieldByName("key"), el.getKey().toString()); + entryBuilder.setField(valueField, toProtobufValue(valueField, el.getValue())); + messageBuilder.addRepeatedField(field, entryBuilder.build()); + } } + } else { + messageBuilder.setField(field, toProtobufValue(field, fieldValue)); } - }); + } + } - return messageBuilder.build(); + + private T toNumber(Object object, Class clazz) { + if (object instanceof Number) { + return numberToSpecific((Number) object, clazz); + } else if (object instanceof String) { + return numberToSpecific(Double.parseDouble((String) object), clazz); + } else if (object instanceof Boolean) { + return numberToSpecific((Boolean) object ? 1 : 0, clazz); + } else return clazz.cast(object); + + } + + private T numberToSpecific(Number object, Class clazz) { + if (clazz == Integer.class) { + return clazz.cast((object).intValue()); + } else if (clazz == Long.class) { + return clazz.cast((object).longValue()); + } else if (clazz == Float.class) { + return clazz.cast((object).floatValue()); + } else if (clazz == Double.class) { + return clazz.cast((object).doubleValue()); + } else return clazz.cast(object); } private Object toProtobufValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) { switch (fieldDescriptor.getType()) { + case UINT32: case INT32: case SINT32: case SFIXED32: + return toNumber(value, Integer.class); case INT64: case SINT64: + case FIXED64: + case UINT64: case SFIXED64: - case BOOL: + return toNumber(value, Long.class); case FLOAT: + return toNumber(value, Float.class); case DOUBLE: - return value; + return toNumber(value, Double.class); case STRING: return value.toString(); + case BOOL: + if (value instanceof Boolean) { + return value; + } else if (value instanceof Number) { + return ((Number) value).intValue() != 0; + } else + return Boolean.parseBoolean(value.toString()); + case ENUM: Descriptors.EnumDescriptor enumDescriptor = fieldDescriptor.getEnumType(); return enumDescriptor.findValueByName((String) value); - case FIXED64: - case UINT64: - BigInteger bigInt = (BigInteger) value; - return bigInt.longValue(); case BYTES: ByteBuffer byteBuffer = (ByteBuffer) value; return ByteString.copyFrom(byteBuffer); case FIXED32: - case UINT32: return ((Long) value).intValue(); case MESSAGE: Descriptors.Descriptor messageDescriptor = fieldDescriptor.getMessageType(); diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/AvroTrait.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/AvroTrait.groovy new file mode 100644 index 0000000000..d9022d93b3 --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/AvroTrait.groovy @@ -0,0 +1,14 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro + +import org.apache.avro.AvroRuntimeException +import org.apache.avro.Schema +import org.apache.avro.generic.GenericDatumReader +import org.apache.avro.generic.GenericRecord +import org.apache.avro.io.DatumReader +import org.apache.avro.io.DecoderFactory + +trait AvroTrait { + Schema getSchemaFromResources(String fileName) { + return new Schema.Parser().parse(AvroTrait.class.getClassLoader().getResourceAsStream("schemas/${fileName}.avsc")) + } +} \ No newline at end of file diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertAndCastPrimitivesTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertAndCastPrimitivesTest.groovy new file mode 100644 index 0000000000..1ac81d7330 --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertAndCastPrimitivesTest.groovy @@ -0,0 +1,94 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.conversions + +import com.google.protobuf.DynamicMessage +import org.apache.avro.Schema +import org.apache.avro.generic.GenericRecord +import org.apache.avro.generic.GenericRecordBuilder +import org.junit.jupiter.api.Test +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.AvroTrait +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroToProtoConverter +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto +import spock.lang.Specification + +class ConvertAndCastPrimitivesTest extends Specification implements AvroTrait { + + @Test + + void 'should convert and cast primitive types'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = new GenericRecordBuilder(schema).set(fieldName, avroValue).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def converted_value = message.getField(field) + if (field.getDefaultValue() != avroValue) { + record.hasField(fieldName) == message.hasField(field) + } + converted_value == expectedProtoValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue + "primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | "value" | "value" + "primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | 12 | "12" + "primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | 12l | "12" + "primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | 12f | "12.0" + "primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | 12d | "12.0" + + "primitives" | "int" | Int32Proto.PrimitivesInt32.getDescriptor() | 12 | 12 + "primitives" | "long" | Int32Proto.PrimitivesInt32.getDescriptor() | 12l | 12 + "primitives" | "float" | Int32Proto.PrimitivesInt32.getDescriptor() | 12f | 12 + "primitives" | "double" | Int32Proto.PrimitivesInt32.getDescriptor() | 12d | 12 + "primitives" | "string" | Int32Proto.PrimitivesInt32.getDescriptor() | "12" | 12 + "primitives" | "boolean" | Int32Proto.PrimitivesInt32.getDescriptor() | true | 1 + "primitives" | "boolean" | Int32Proto.PrimitivesInt32.getDescriptor() | false | 0 + + "primitives" | "int" | Int64Proto.PrimitivesInt64.getDescriptor() | 12 | 12l + "primitives" | "long" | Int64Proto.PrimitivesInt64.getDescriptor() | 12l | 12l + "primitives" | "float" | Int64Proto.PrimitivesInt64.getDescriptor() | 12f | 12l + "primitives" | "double" | Int64Proto.PrimitivesInt64.getDescriptor() | 12d | 12l + "primitives" | "string" | Int64Proto.PrimitivesInt64.getDescriptor() | "12.0" | 12l + "primitives" | "boolean" | Int64Proto.PrimitivesInt64.getDescriptor() | true | 1l + "primitives" | "boolean" | Int64Proto.PrimitivesInt64.getDescriptor() | false | 0l + + "primitives" | "int" | FloatProto.PrimitivesFloat.getDescriptor() | 12 | 12.0f + "primitives" | "long" | FloatProto.PrimitivesFloat.getDescriptor() | 12l | 12.0f + "primitives" | "float" | FloatProto.PrimitivesFloat.getDescriptor() | 12.234f | 12.234f + "primitives" | "double" | FloatProto.PrimitivesFloat.getDescriptor() | 12.234d | 12.234f + "primitives" | "string" | FloatProto.PrimitivesFloat.getDescriptor() | "12.234" | 12.234f + "primitives" | "boolean" | FloatProto.PrimitivesFloat.getDescriptor() | true | 1f + "primitives" | "boolean" | FloatProto.PrimitivesFloat.getDescriptor() | false | 0f + + "primitives" | "int" | DoubleProto.PrimitivesDouble.getDescriptor() | 12 | 12.0d + "primitives" | "long" | DoubleProto.PrimitivesDouble.getDescriptor() | 12l | 12.0d + "primitives" | "float" | DoubleProto.PrimitivesDouble.getDescriptor() | 12.5f | 12.5d + "primitives" | "double" | DoubleProto.PrimitivesDouble.getDescriptor() | 12.234d | 12.234d + "primitives" | "string" | DoubleProto.PrimitivesDouble.getDescriptor() | "12.234" | 12.234d + "primitives" | "boolean" | DoubleProto.PrimitivesDouble.getDescriptor() | true | 1d + "primitives" | "boolean" | DoubleProto.PrimitivesDouble.getDescriptor() | false | 0d + + "primitives" | "boolean" | BoolProto.PrimitivesBool.getDescriptor() | true | true + "primitives" | "boolean" | BoolProto.PrimitivesBool.getDescriptor() | false | false + "primitives" | "string" | BoolProto.PrimitivesBool.getDescriptor() | "true" | true + "primitives" | "string" | BoolProto.PrimitivesBool.getDescriptor() | "false" | false + "primitives" | "string" | BoolProto.PrimitivesBool.getDescriptor() | "True" | true + "primitives" | "string" | BoolProto.PrimitivesBool.getDescriptor() | "False" | false + "primitives" | "boolean" | BoolProto.PrimitivesBool.getDescriptor() | 1 | true + "primitives" | "boolean" | BoolProto.PrimitivesBool.getDescriptor() | 0 | false + } +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertArrayOfPrimitivesTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertArrayOfPrimitivesTest.groovy new file mode 100644 index 0000000000..e05ff81bb6 --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertArrayOfPrimitivesTest.groovy @@ -0,0 +1,110 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.conversions + +import com.google.protobuf.DynamicMessage +import org.apache.avro.Schema +import org.apache.avro.generic.GenericRecord +import org.apache.avro.generic.GenericRecordBuilder +import org.junit.jupiter.api.Test +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.AvroTrait +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroToProtoConverter +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto +import spock.lang.Specification + +import java.nio.ByteBuffer + +class ConvertArrayOfPrimitivesTest extends Specification implements AvroTrait { + + @Test + void 'should convert array primitive types'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = new GenericRecordBuilder(schema).set(fieldName, avroValue).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def converted_value = message.getField(field).collect { transformResult(it) } + converted_value == expectedProtoValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue | transformResult + "array-primitives" | "string" | ArrayStringProto.ArrayPrimitivesString.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "int" | ArrayInt32Proto.ArrayPrimitivesInt32.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "long" | ArrayInt64Proto.ArrayPrimitivesInt64.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "boolean" | ArrayInt64Proto.ArrayPrimitivesInt64.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "boolean" | ArrayBoolProto.ArrayPrimitivesBool.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "bytes" | ArrayBytesProto.ArrayPrimitivesBytes.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "float" | ArrayFloatProto.ArrayPrimitivesFloat.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "double" | ArrayDoubleProto.ArrayPrimitivesDouble.getDescriptor() | [] | [] | { c -> c } + "array-primitives" | "string" | ArrayStringProto.ArrayPrimitivesString.getDescriptor() | ["a", "b", "c"] | ["a", "b", "c"] | { c -> c } + "array-primitives" | "int" | ArrayInt32Proto.ArrayPrimitivesInt32.getDescriptor() | [1, 2, 3] | [1, 2, 3] | { c -> c } + "array-primitives" | "long" | ArrayInt64Proto.ArrayPrimitivesInt64.getDescriptor() | [4l, 5l, 6l] | [4l, 5l, 6l] | { c -> c } + "array-primitives" | "boolean" | ArrayBoolProto.ArrayPrimitivesBool.getDescriptor() | [true, true, false] | [true, true, false] | { c -> c } + "array-primitives" | "bytes" | ArrayBytesProto.ArrayPrimitivesBytes.getDescriptor() | [ByteBuffer.wrap("123".getBytes()), ByteBuffer.wrap("456".getBytes())] | ["123".bytes, "456".bytes] | { c -> c.bytes } + "array-primitives" | "float" | ArrayFloatProto.ArrayPrimitivesFloat.getDescriptor() | [3.14f, 6.28f] | [3.14f, 6.28f] | { c -> c } + "array-primitives" | "double" | ArrayDoubleProto.ArrayPrimitivesDouble.getDescriptor() | [3.14d, 6.28d] | [3.14d, 6.28d] | { c -> c } + } + + @Test + void 'should convert map of primitive types'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = new GenericRecordBuilder(schema).set(fieldName, avroValue).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def converted_value = message.getField(field).toString().replace("\n", " ") + converted_value == expectedProtoValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue | transformResult + "map-primitives" | "string" | StringToStringProto.PrimitivesStringToString.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "int" | StringToInt32Proto.PrimitivesStringToInt32.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "long" | StringToInt64Proto.PrimitivesStringToInt64.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "boolean" | StringToInt64Proto.PrimitivesStringToInt64.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "boolean" | StringToBoolProto.PrimitivesStringToBool.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "bytes" | StringToBytesProto.PrimitivesStringToBytes.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "float" | StringToFloatProto.PrimitivesStringToFloat.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "double" | StringToDoubleProto.PrimitivesStringToDouble.getDescriptor() | [:] | "[]" | { c -> c } + "map-primitives" | "string" | StringToStringProto.PrimitivesStringToString.getDescriptor() | ["a": "a", "b": "b", "c": "c"] | "[key: \"a\" value: \"a\" , key: \"b\" value: \"b\" , key: \"c\" value: \"c\" ]" | { c -> c } + "map-primitives" | "int" | StringToInt32Proto.PrimitivesStringToInt32.getDescriptor() | ["a": 1, "b": 2, "c": 3] | "[key: \"a\" value: 1 , key: \"b\" value: 2 , key: \"c\" value: 3 ]" | { c -> c } + "map-primitives" | "long" | StringToInt64Proto.PrimitivesStringToInt64.getDescriptor() | ["a": 4l, "b": 5l, "c": 6l] | "[key: \"a\" value: 4 , key: \"b\" value: 5 , key: \"c\" value: 6 ]" | { c -> c } + "map-primitives" | "boolean" | StringToBoolProto.PrimitivesStringToBool.getDescriptor() | ["a": true, "b": true, "c": false] | "[key: \"a\" value: true , key: \"b\" value: true , key: \"c\" value: false ]" | { c -> c } + "map-primitives" | "bytes" | StringToBytesProto.PrimitivesStringToBytes.getDescriptor() | ["a": ByteBuffer.wrap("123".getBytes()), "b": ByteBuffer.wrap("456".getBytes())] | "[key: \"a\" value: \"123\" , key: \"b\" value: \"456\" ]" | { c -> c } + "map-primitives" | "float" | StringToFloatProto.PrimitivesStringToFloat.getDescriptor() | ["a": 3.14f, "b": 6.28f] | "[key: \"a\" value: 3.14 , key: \"b\" value: 6.28 ]" | { c -> c } + "map-primitives" | "double" | StringToDoubleProto.PrimitivesStringToDouble.getDescriptor() | ["a": 3.14d, "b": 6.28d] | "[key: \"a\" value: 3.14 , key: \"b\" value: 6.28 ]" | { c -> c } + + } +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertPrimitivesTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertPrimitivesTest.groovy new file mode 100644 index 0000000000..57d984ed15 --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertPrimitivesTest.groovy @@ -0,0 +1,176 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.conversions + +import com.google.protobuf.DynamicMessage +import org.apache.avro.Schema +import org.apache.avro.generic.GenericRecord +import org.apache.avro.generic.GenericRecordBuilder +import org.junit.jupiter.api.Test +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.AvroTrait +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroToProtoConverter +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto +import spock.lang.Specification + +import java.nio.ByteBuffer + +class ConvertPrimitivesTest extends Specification implements AvroTrait { + @Test + void 'should convert primitive types'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = new GenericRecordBuilder(schema).set(fieldName, avroValue).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def converted_value = message.getField(field) + record.hasField(fieldName) == message.hasField(field) + transformResult(converted_value) == expectedProtoValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue | transformResult + "primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | "value" | "value" | { c -> c } + "primitives" | "int" | Int32Proto.PrimitivesInt32.getDescriptor() | 12 | 12 | { c -> c } + "primitives" | "long" | Int64Proto.PrimitivesInt64.getDescriptor() | 12l | 12l | { c -> c } + "primitives" | "boolean" | BoolProto.PrimitivesBool.getDescriptor() | true | true | { c -> c } + "primitives" | "bytes" | BytesProto.PrimitivesBytes.getDescriptor() | ByteBuffer.wrap("123".getBytes()) | "123" | { c -> new String(c.bytes) } + "primitives" | "float" | FloatProto.PrimitivesFloat.getDescriptor() | 1.234f | 1.234f | { c -> c } + "primitives" | "double" | DoubleProto.PrimitivesDouble.getDescriptor() | 1.234d | 1.234d | { c -> c } + } + + @Test + void 'should convert nullable primitive types'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = new GenericRecordBuilder(schema).set(fieldName, avroValue).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def converted_value = message.hasField(field) ? (message.getField(field)) : null + transformResult(converted_value) == expectedProtoValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue | transformResult + "nullable-primitives" | "long" | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | 12 | 12l | { c -> c } + "nullable-primitives" | "string" | NStringProto.NullablePrimitivesString.getDescriptor() | null | null | { c -> c } + "nullable-primitives" | "string" | NStringProto.NullablePrimitivesString.getDescriptor() | "value" | "value" | { c -> c } + "nullable-primitives" | "int" | NInt32Proto.NullablePrimitivesInt32.getDescriptor() | 12 | 12 | { c -> c } + "nullable-primitives" | "long" | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | 12l | 12l | { c -> c } + "nullable-primitives" | "boolean" | NBoolProto.NullablePrimitivesBool.getDescriptor() | true | true | { c -> c } + "nullable-primitives" | "bytes" | NBytesProto.NullablePrimitivesBytes.getDescriptor() | ByteBuffer.wrap("123".getBytes()) | "123" | { c -> new String(c.bytes) } + "nullable-primitives" | "float" | NFloatProto.NullablePrimitivesFloat.getDescriptor() | 1.234f | 1.234f | { c -> c } + "nullable-primitives" | "double" | NDoubleProto.NullablePrimitivesDouble.getDescriptor() | 1.234d | 1.234d | { c -> c } + + + } + + @Test + void 'should convert nullable primitive types when null'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = new GenericRecordBuilder(schema).set(fieldName, avroValue).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + record.hasField(fieldName) == !message.hasField(field) + def converted_value = message.hasField(field) ? (message.getField(field)) : null + converted_value == expectedProtoValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue + "nullable-primitives" | "string" | NStringProto.NullablePrimitivesString.getDescriptor() | null | null + "nullable-primitives" | "int" | NInt32Proto.NullablePrimitivesInt32.getDescriptor() | null | null + "nullable-primitives" | "long" | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | null | null + "nullable-primitives" | "boolean" | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | null | null + "nullable-primitives" | "bytes" | NBytesProto.NullablePrimitivesBytes.getDescriptor() | null | null + "nullable-primitives" | "float" | NFloatProto.NullablePrimitivesFloat.getDescriptor() | null | null + "nullable-primitives" | "double" | NDoubleProto.NullablePrimitivesDouble.getDescriptor() | null | null + + + } + + @Test + void 'should convert primitive types with default values'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + GenericRecord record = fieldExists ? new GenericRecordBuilder(schema).set(fieldName, null).build() : new GenericRecordBuilder(schema).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def converted_value = message.hasField(field) ? (message.getField(field)) : null + transformResult(converted_value) == expectedProtoValue + + + where: + suite | avroType | fieldExists | protoDescriptor | expectedProtoValue | transformResult + "default-primitives" | "string" | true | NStringProto.NullablePrimitivesString.getDescriptor() | null | { c -> c } + "default-primitives" | "int" | true | NInt32Proto.NullablePrimitivesInt32.getDescriptor() | null | { c -> c } + "default-primitives" | "long" | true | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | null | { c -> c } + "default-primitives" | "boolean" | true | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | null | { c -> c } + "default-primitives" | "boolean" | true | NBoolProto.NullablePrimitivesBool.getDescriptor() | null | { c -> c } + "default-primitives" | "bytes" | true | NBytesProto.NullablePrimitivesBytes.getDescriptor() | null | { c -> c } + "default-primitives" | "float" | true | NFloatProto.NullablePrimitivesFloat.getDescriptor() | null | { c -> c } + "default-primitives" | "double" | true | NDoubleProto.NullablePrimitivesDouble.getDescriptor() | null | { c -> c } + "default-primitives" | "string" | false | NStringProto.NullablePrimitivesString.getDescriptor() | "Z sejmu dla Faktów Katarzyna Bolesna-Mordęga" | { c -> c } + "default-primitives" | "int" | false | NInt32Proto.NullablePrimitivesInt32.getDescriptor() | 997 | { c -> c } + "default-primitives" | "long" | false | NInt64Proto.NullablePrimitivesInt64.getDescriptor() | 1614322339997 | { c -> c } + "default-primitives" | "boolean" | false | NBoolProto.NullablePrimitivesBool.getDescriptor() | true | { c -> c } + "default-primitives" | "bytes" | false | NBytesProto.NullablePrimitivesBytes.getDescriptor() | "\u0074\u0065\u0073\u0074".getBytes() | { c -> c.bytes } + "default-primitives" | "float" | false | NFloatProto.NullablePrimitivesFloat.getDescriptor() | 3.14f | { c -> c } + "default-primitives" | "double" | false | NDoubleProto.NullablePrimitivesDouble.getDescriptor() | 3.14d | { c -> c } + + + } + + +} diff --git a/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertRecordWithPrimitivesTest.groovy b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertRecordWithPrimitivesTest.groovy new file mode 100644 index 0000000000..bf97789ef9 --- /dev/null +++ b/hermes-consumers/src/test/groovy/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/conversions/ConvertRecordWithPrimitivesTest.groovy @@ -0,0 +1,62 @@ +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.conversions + +import com.google.protobuf.DynamicMessage +import org.apache.avro.Schema +import org.apache.avro.generic.GenericRecord +import org.apache.avro.generic.GenericRecordBuilder +import org.junit.jupiter.api.Test +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.AvroTrait +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.GoogleBigQueryAvroToProtoConverter +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto +import pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto +import spock.lang.Specification + +import java.nio.ByteBuffer + +class ConvertRecordWithPrimitivesTest extends Specification implements AvroTrait { + @Test + void 'should convert record with primitive types'() { + + given: + Schema schema = getSchemaFromResources("${suite}/${avroType}") + String fieldName = "field" + String valueFieldName = "value_field" + GenericRecord record = new GenericRecordBuilder(schema).set( + fieldName, + new GenericRecordBuilder(schema.getField(fieldName).schema()).set(valueFieldName, avroValue).build() + ).build() + GoogleBigQueryAvroToProtoConverter converter = new GoogleBigQueryAvroToProtoConverter() + + when: + DynamicMessage message = converter.convertToProtoMessage(protoDescriptor, record) + + + then: + message != null + println(message) + def field = message.getDescriptorForType().findFieldByName(fieldName) + def convertedFieldValue = message.getField(field).toString().replace("\\", "").replace("\n", "") + def expectedRecord = "value_field: ${expectedProtoValue}".replace("\\", "").replace("\n", "") + expectedRecord == convertedFieldValue + + + where: + suite | avroType | protoDescriptor | avroValue | expectedProtoValue | transformResult + "record-primitives" | "string" | RecordStringProto.RecordPrimitivesString.getDescriptor() | "value" | "\"value\"" | { c -> c } + "record-primitives" | "int" | RecordInt32Proto.RecordPrimitivesInt32.getDescriptor() | 12 | 12 | { c -> c } + "record-primitives" | "long" | RecordInt64Proto.RecordPrimitivesInt64.getDescriptor() | 12l | 12l | { c -> c } + "record-primitives" | "boolean" | RecordInt64Proto.RecordPrimitivesInt64.getDescriptor() | 12l | 12l | { c -> c } + "record-primitives" | "boolean" | RecordBoolProto.RecordPrimitivesBool.getDescriptor() | true | true | { c -> c } + "record-primitives" | "bytes" | RecordBytesProto.RecordPrimitivesBytes.getDescriptor() | ByteBuffer.wrap("123".getBytes()) | "\"123\"" | { c -> new String(c.bytes) } + "record-primitives" | "float" | RecordFloatProto.RecordPrimitivesFloat.getDescriptor() | 1.234f | 1.234f | { c -> c } + "record-primitives" | "double" | RecordDoubleProto.RecordPrimitivesDouble.getDescriptor() | 1.234d | 1.234d | { c -> c } + + + } + +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBoolProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBoolProto.java new file mode 100644 index 0000000000..9003ce5835 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBoolProto.java @@ -0,0 +1,664 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayBoolProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayBoolProto { + private ArrayBoolProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesBoolOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated bool field = 1; + * @return A list containing the field. + */ + java.util.List getFieldList(); + /** + * repeated bool field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated bool field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + boolean getField(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool} + */ + public static final class ArrayPrimitivesBool extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool) + ArrayPrimitivesBoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesBool.newBuilder() to construct. + private ArrayPrimitivesBool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesBool() { + field_ = emptyBooleanList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesBool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesBool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = newBooleanList(); + mutable_bitField0_ |= 0x00000001; + } + field_.addBoolean(input.readBool()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + field_ = newBooleanList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + field_.addBoolean(input.readBool()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.BooleanList field_; + /** + * repeated bool field = 1; + * @return A list containing the field. + */ + @java.lang.Override + public java.util.List + getFieldList() { + return field_; + } + /** + * repeated bool field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated bool field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public boolean getField(int index) { + return field_.getBoolean(index); + } + private int fieldMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getFieldList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(fieldMemoizedSerializedSize); + } + for (int i = 0; i < field_.size(); i++) { + output.writeBoolNoTag(field_.getBoolean(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 1 * getFieldList().size(); + size += dataSize; + if (!getFieldList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + fieldMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = emptyBooleanList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.BooleanList field_ = emptyBooleanList(); + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = mutableCopy(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bool field = 1; + * @return A list containing the field. + */ + public java.util.List + getFieldList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(field_) : field_; + } + /** + * repeated bool field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated bool field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public boolean getField(int index) { + return field_.getBoolean(index); + } + /** + * repeated bool field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, boolean value) { + ensureFieldIsMutable(); + field_.setBoolean(index, value); + onChanged(); + return this; + } + /** + * repeated bool field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField(boolean value) { + ensureFieldIsMutable(); + field_.addBoolean(value); + onChanged(); + return this; + } + /** + * repeated bool field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated bool field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = emptyBooleanList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBool) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesBool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesBool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBoolProto.ArrayPrimitivesBool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.schemas/primitives-arrays/ArrayBoolPro" + + "to.proto\022Opl.allegro.tech.hermes.consume" + + "rs.consumer.sender.googlebigquery.avro.d" + + "escriptor\"$\n\023ArrayPrimitivesBool\022\r\n\005fiel" + + "d\030\001 \003(\010b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBool_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBytesProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBytesProto.java new file mode 100644 index 0000000000..10fd0d45e8 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayBytesProto.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayBytesProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayBytesProto { + private ArrayBytesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesBytesOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated bytes field = 1; + * @return A list containing the field. + */ + java.util.List getFieldList(); + /** + * repeated bytes field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated bytes field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + com.google.protobuf.ByteString getField(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes} + */ + public static final class ArrayPrimitivesBytes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes) + ArrayPrimitivesBytesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesBytes.newBuilder() to construct. + private ArrayPrimitivesBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesBytes() { + field_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesBytes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesBytes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + field_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = java.util.Collections.unmodifiableList(field_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private java.util.List field_; + /** + * repeated bytes field = 1; + * @return A list containing the field. + */ + @java.lang.Override + public java.util.List + getFieldList() { + return field_; + } + /** + * repeated bytes field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated bytes field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public com.google.protobuf.ByteString getField(int index) { + return field_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < field_.size(); i++) { + output.writeBytes(1, field_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < field_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(field_.get(i)); + } + size += dataSize; + size += 1 * getFieldList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_ = java.util.Collections.unmodifiableList(field_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List field_ = java.util.Collections.emptyList(); + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = new java.util.ArrayList(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes field = 1; + * @return A list containing the field. + */ + public java.util.List + getFieldList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(field_) : field_; + } + /** + * repeated bytes field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated bytes field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public com.google.protobuf.ByteString getField(int index) { + return field_.get(index); + } + /** + * repeated bytes field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldIsMutable(); + field_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldIsMutable(); + field_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated bytes field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesBytes) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesBytes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesBytes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayBytesProto.ArrayPrimitivesBytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-arrays/ArrayBytesPr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"%\n\024ArrayPrimitivesBytes\022\r\n\005fi" + + "eld\030\001 \003(\014b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesBytes_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayDoubleProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayDoubleProto.java new file mode 100644 index 0000000000..7efd6b3b8b --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayDoubleProto.java @@ -0,0 +1,664 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayDoubleProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayDoubleProto { + private ArrayDoubleProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesDoubleOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated double field = 1; + * @return A list containing the field. + */ + java.util.List getFieldList(); + /** + * repeated double field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated double field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + double getField(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble} + */ + public static final class ArrayPrimitivesDouble extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble) + ArrayPrimitivesDoubleOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesDouble.newBuilder() to construct. + private ArrayPrimitivesDouble(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesDouble() { + field_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesDouble(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesDouble( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + field_.addDouble(input.readDouble()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + field_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + field_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.DoubleList field_; + /** + * repeated double field = 1; + * @return A list containing the field. + */ + @java.lang.Override + public java.util.List + getFieldList() { + return field_; + } + /** + * repeated double field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated double field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public double getField(int index) { + return field_.getDouble(index); + } + private int fieldMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getFieldList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(fieldMemoizedSerializedSize); + } + for (int i = 0; i < field_.size(); i++) { + output.writeDoubleNoTag(field_.getDouble(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getFieldList().size(); + size += dataSize; + if (!getFieldList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + fieldMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDoubleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.DoubleList field_ = emptyDoubleList(); + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = mutableCopy(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated double field = 1; + * @return A list containing the field. + */ + public java.util.List + getFieldList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(field_) : field_; + } + /** + * repeated double field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated double field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public double getField(int index) { + return field_.getDouble(index); + } + /** + * repeated double field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, double value) { + ensureFieldIsMutable(); + field_.setDouble(index, value); + onChanged(); + return this; + } + /** + * repeated double field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField(double value) { + ensureFieldIsMutable(); + field_.addDouble(value); + onChanged(); + return this; + } + /** + * repeated double field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated double field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesDouble) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesDouble parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesDouble(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayDoubleProto.ArrayPrimitivesDouble getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0schemas/primitives-arrays/ArrayDoubleP" + + "roto.proto\022Opl.allegro.tech.hermes.consu" + + "mers.consumer.sender.googlebigquery.avro" + + ".descriptor\"&\n\025ArrayPrimitivesDouble\022\r\n\005" + + "field\030\001 \003(\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesDouble_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayFloatProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayFloatProto.java new file mode 100644 index 0000000000..fce9c75df5 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayFloatProto.java @@ -0,0 +1,664 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayFloatProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayFloatProto { + private ArrayFloatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesFloatOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated float field = 1; + * @return A list containing the field. + */ + java.util.List getFieldList(); + /** + * repeated float field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated float field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + float getField(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat} + */ + public static final class ArrayPrimitivesFloat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat) + ArrayPrimitivesFloatOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesFloat.newBuilder() to construct. + private ArrayPrimitivesFloat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesFloat() { + field_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesFloat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesFloat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + field_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + field_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + field_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList field_; + /** + * repeated float field = 1; + * @return A list containing the field. + */ + @java.lang.Override + public java.util.List + getFieldList() { + return field_; + } + /** + * repeated float field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated float field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public float getField(int index) { + return field_.getFloat(index); + } + private int fieldMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getFieldList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(fieldMemoizedSerializedSize); + } + for (int i = 0; i < field_.size(); i++) { + output.writeFloatNoTag(field_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getFieldList().size(); + size += dataSize; + if (!getFieldList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + fieldMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList field_ = emptyFloatList(); + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = mutableCopy(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated float field = 1; + * @return A list containing the field. + */ + public java.util.List + getFieldList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(field_) : field_; + } + /** + * repeated float field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated float field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public float getField(int index) { + return field_.getFloat(index); + } + /** + * repeated float field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, float value) { + ensureFieldIsMutable(); + field_.setFloat(index, value); + onChanged(); + return this; + } + /** + * repeated float field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField(float value) { + ensureFieldIsMutable(); + field_.addFloat(value); + onChanged(); + return this; + } + /** + * repeated float field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated float field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesFloat) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesFloat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesFloat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayFloatProto.ArrayPrimitivesFloat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-arrays/ArrayFloatPr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"%\n\024ArrayPrimitivesFloat\022\r\n\005fi" + + "eld\030\001 \003(\002b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesFloat_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt32Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt32Proto.java new file mode 100644 index 0000000000..2334d8b3f1 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt32Proto.java @@ -0,0 +1,667 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayInt32Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayInt32Proto { + private ArrayInt32Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesInt32OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated int32 field = 1; + * @return A list containing the field. + */ + java.util.List getFieldList(); + /** + * repeated int32 field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated int32 field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + int getField(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32} + */ + public static final class ArrayPrimitivesInt32 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32) + ArrayPrimitivesInt32OrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesInt32.newBuilder() to construct. + private ArrayPrimitivesInt32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesInt32() { + field_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesInt32(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesInt32( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + field_.addInt(input.readInt32()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + field_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + field_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.IntList field_; + /** + * repeated int32 field = 1; + * @return A list containing the field. + */ + @java.lang.Override + public java.util.List + getFieldList() { + return field_; + } + /** + * repeated int32 field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated int32 field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public int getField(int index) { + return field_.getInt(index); + } + private int fieldMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getFieldList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(fieldMemoizedSerializedSize); + } + for (int i = 0; i < field_.size(); i++) { + output.writeInt32NoTag(field_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < field_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(field_.getInt(i)); + } + size += dataSize; + if (!getFieldList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + fieldMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.IntList field_ = emptyIntList(); + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = mutableCopy(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int32 field = 1; + * @return A list containing the field. + */ + public java.util.List + getFieldList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(field_) : field_; + } + /** + * repeated int32 field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated int32 field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public int getField(int index) { + return field_.getInt(index); + } + /** + * repeated int32 field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, int value) { + ensureFieldIsMutable(); + field_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated int32 field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField(int value) { + ensureFieldIsMutable(); + field_.addInt(value); + onChanged(); + return this; + } + /** + * repeated int32 field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated int32 field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt32) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesInt32 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesInt32(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt32Proto.ArrayPrimitivesInt32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-arrays/ArrayInt32Pr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"%\n\024ArrayPrimitivesInt32\022\r\n\005fi" + + "eld\030\001 \003(\005b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt32_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt64Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt64Proto.java new file mode 100644 index 0000000000..eee9f74e0e --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayInt64Proto.java @@ -0,0 +1,667 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayInt64Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayInt64Proto { + private ArrayInt64Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesInt64OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated int64 field = 1; + * @return A list containing the field. + */ + java.util.List getFieldList(); + /** + * repeated int64 field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated int64 field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + long getField(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64} + */ + public static final class ArrayPrimitivesInt64 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64) + ArrayPrimitivesInt64OrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesInt64.newBuilder() to construct. + private ArrayPrimitivesInt64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesInt64() { + field_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesInt64(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesInt64( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + field_.addLong(input.readInt64()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + field_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + field_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList field_; + /** + * repeated int64 field = 1; + * @return A list containing the field. + */ + @java.lang.Override + public java.util.List + getFieldList() { + return field_; + } + /** + * repeated int64 field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated int64 field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public long getField(int index) { + return field_.getLong(index); + } + private int fieldMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getFieldList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(fieldMemoizedSerializedSize); + } + for (int i = 0; i < field_.size(); i++) { + output.writeInt64NoTag(field_.getLong(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < field_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(field_.getLong(i)); + } + size += dataSize; + if (!getFieldList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + fieldMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.LongList field_ = emptyLongList(); + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = mutableCopy(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 field = 1; + * @return A list containing the field. + */ + public java.util.List + getFieldList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(field_) : field_; + } + /** + * repeated int64 field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated int64 field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public long getField(int index) { + return field_.getLong(index); + } + /** + * repeated int64 field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, long value) { + ensureFieldIsMutable(); + field_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField(long value) { + ensureFieldIsMutable(); + field_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated int64 field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesInt64) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesInt64 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesInt64(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayInt64Proto.ArrayPrimitivesInt64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-arrays/ArrayInt64Pr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"%\n\024ArrayPrimitivesInt64\022\r\n\005fi" + + "eld\030\001 \003(\003b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesInt64_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayStringProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayStringProto.java new file mode 100644 index 0000000000..524497ba0c --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/ArrayStringProto.java @@ -0,0 +1,690 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-arrays/ArrayStringProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class ArrayStringProto { + private ArrayStringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ArrayPrimitivesStringOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string field = 1; + * @return A list containing the field. + */ + java.util.List + getFieldList(); + /** + * repeated string field = 1; + * @return The count of field. + */ + int getFieldCount(); + /** + * repeated string field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + java.lang.String getField(int index); + /** + * repeated string field = 1; + * @param index The index of the value to return. + * @return The bytes of the field at the given index. + */ + com.google.protobuf.ByteString + getFieldBytes(int index); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString} + */ + public static final class ArrayPrimitivesString extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString) + ArrayPrimitivesStringOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayPrimitivesString.newBuilder() to construct. + private ArrayPrimitivesString(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayPrimitivesString() { + field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayPrimitivesString(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayPrimitivesString( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + field_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = field_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList field_; + /** + * repeated string field = 1; + * @return A list containing the field. + */ + public com.google.protobuf.ProtocolStringList + getFieldList() { + return field_; + } + /** + * repeated string field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated string field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public java.lang.String getField(int index) { + return field_.get(index); + } + /** + * repeated string field = 1; + * @param index The index of the value to return. + * @return The bytes of the field at the given index. + */ + public com.google.protobuf.ByteString + getFieldBytes(int index) { + return field_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < field_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < field_.size(); i++) { + dataSize += computeStringSizeNoTag(field_.getRaw(i)); + } + size += dataSize; + size += 1 * getFieldList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString) obj; + + if (!getFieldList() + .equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesStringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_ = field_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString.getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = new com.google.protobuf.LazyStringArrayList(field_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string field = 1; + * @return A list containing the field. + */ + public com.google.protobuf.ProtocolStringList + getFieldList() { + return field_.getUnmodifiableView(); + } + /** + * repeated string field = 1; + * @return The count of field. + */ + public int getFieldCount() { + return field_.size(); + } + /** + * repeated string field = 1; + * @param index The index of the element to return. + * @return The field at the given index. + */ + public java.lang.String getField(int index) { + return field_.get(index); + } + /** + * repeated string field = 1; + * @param index The index of the value to return. + * @return The bytes of the field at the given index. + */ + public com.google.protobuf.ByteString + getFieldBytes(int index) { + return field_.getByteString(index); + } + /** + * repeated string field = 1; + * @param index The index to set the value at. + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldIsMutable(); + field_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string field = 1; + * @param value The field to add. + * @return This builder for chaining. + */ + public Builder addField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldIsMutable(); + field_.add(value); + onChanged(); + return this; + } + /** + * repeated string field = 1; + * @param values The field to add. + * @return This builder for chaining. + */ + public Builder addAllField( + java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, field_); + onChanged(); + return this; + } + /** + * repeated string field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string field = 1; + * @param value The bytes of the field to add. + * @return This builder for chaining. + */ + public Builder addFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldIsMutable(); + field_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayPrimitivesString) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayPrimitivesString parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayPrimitivesString(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.ArrayStringProto.ArrayPrimitivesString getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0schemas/primitives-arrays/ArrayStringP" + + "roto.proto\022Opl.allegro.tech.hermes.consu" + + "mers.consumer.sender.googlebigquery.avro" + + ".descriptor\"&\n\025ArrayPrimitivesString\022\r\n\005" + + "field\030\001 \003(\tb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_ArrayPrimitivesString_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BoolProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BoolProto.java new file mode 100644 index 0000000000..33636ebd34 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BoolProto.java @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/BoolProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class BoolProto { + private BoolProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesBoolOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool) + com.google.protobuf.MessageOrBuilder { + + /** + * bool field = 1; + * @return The field. + */ + boolean getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool} + */ + public static final class PrimitivesBool extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool) + PrimitivesBoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesBool.newBuilder() to construct. + private PrimitivesBool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesBool() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesBool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesBool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + field_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private boolean field_; + /** + * bool field = 1; + * @return The field. + */ + @java.lang.Override + public boolean getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != false) { + output.writeBool(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool) obj; + + if (getField() + != other.getField()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getField()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool.getDefaultInstance()) return this; + if (other.getField() != false) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean field_ ; + /** + * bool field = 1; + * @return The field. + */ + @java.lang.Override + public boolean getField() { + return field_; + } + /** + * bool field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(boolean value) { + + field_ = value; + onChanged(); + return this; + } + /** + * bool field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBool) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesBool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesBool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BoolProto.PrimitivesBool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"schemas/primitives/BoolProto.proto\022Opl" + + ".allegro.tech.hermes.consumers.consumer." + + "sender.googlebigquery.avro.descriptor\"\037\n" + + "\016PrimitivesBool\022\r\n\005field\030\001 \001(\010b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBool_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BytesProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BytesProto.java new file mode 100644 index 0000000000..3f24467c39 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/BytesProto.java @@ -0,0 +1,543 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/BytesProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class BytesProto { + private BytesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesBytesOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes field = 1; + * @return The field. + */ + com.google.protobuf.ByteString getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes} + */ + public static final class PrimitivesBytes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes) + PrimitivesBytesOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesBytes.newBuilder() to construct. + private PrimitivesBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesBytes() { + field_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesBytes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesBytes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + field_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString field_; + /** + * bytes field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!field_.isEmpty()) { + output.writeBytes(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!field_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes) obj; + + if (!getField() + .equals(other.getField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes.getDefaultInstance()) return this; + if (other.getField() != com.google.protobuf.ByteString.EMPTY) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString field_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getField() { + return field_; + } + /** + * bytes field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + * bytes field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesBytes) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesBytes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesBytes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.BytesProto.PrimitivesBytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#schemas/primitives/BytesProto.proto\022Op" + + "l.allegro.tech.hermes.consumers.consumer" + + ".sender.googlebigquery.avro.descriptor\" " + + "\n\017PrimitivesBytes\022\r\n\005field\030\001 \001(\014b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesBytes_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/DoubleProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/DoubleProto.java new file mode 100644 index 0000000000..88de6c2d57 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/DoubleProto.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/DoubleProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class DoubleProto { + private DoubleProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesDoubleOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble) + com.google.protobuf.MessageOrBuilder { + + /** + * double field = 1; + * @return The field. + */ + double getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble} + */ + public static final class PrimitivesDouble extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble) + PrimitivesDoubleOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesDouble.newBuilder() to construct. + private PrimitivesDouble(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesDouble() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesDouble(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesDouble( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + + field_ = input.readDouble(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private double field_; + /** + * double field = 1; + * @return The field. + */ + @java.lang.Override + public double getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(field_) != 0) { + output.writeDouble(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(field_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble) obj; + + if (java.lang.Double.doubleToLongBits(getField()) + != java.lang.Double.doubleToLongBits( + other.getField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getField())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDoubleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble.getDefaultInstance()) return this; + if (other.getField() != 0D) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double field_ ; + /** + * double field = 1; + * @return The field. + */ + @java.lang.Override + public double getField() { + return field_; + } + /** + * double field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(double value) { + + field_ = value; + onChanged(); + return this; + } + /** + * double field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesDouble) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesDouble parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesDouble(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.DoubleProto.PrimitivesDouble getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n$schemas/primitives/DoubleProto.proto\022O" + + "pl.allegro.tech.hermes.consumers.consume" + + "r.sender.googlebigquery.avro.descriptor\"" + + "!\n\020PrimitivesDouble\022\r\n\005field\030\001 \001(\001b\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesDouble_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/FloatProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/FloatProto.java new file mode 100644 index 0000000000..9404e1fd2a --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/FloatProto.java @@ -0,0 +1,541 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/FloatProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class FloatProto { + private FloatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesFloatOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat) + com.google.protobuf.MessageOrBuilder { + + /** + * float field = 1; + * @return The field. + */ + float getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat} + */ + public static final class PrimitivesFloat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat) + PrimitivesFloatOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesFloat.newBuilder() to construct. + private PrimitivesFloat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesFloat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesFloat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesFloat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + field_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private float field_; + /** + * float field = 1; + * @return The field. + */ + @java.lang.Override + public float getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(field_) != 0) { + output.writeFloat(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(field_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat) obj; + + if (java.lang.Float.floatToIntBits(getField()) + != java.lang.Float.floatToIntBits( + other.getField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getField()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat.getDefaultInstance()) return this; + if (other.getField() != 0F) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float field_ ; + /** + * float field = 1; + * @return The field. + */ + @java.lang.Override + public float getField() { + return field_; + } + /** + * float field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(float value) { + + field_ = value; + onChanged(); + return this; + } + /** + * float field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesFloat) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesFloat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesFloat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.FloatProto.PrimitivesFloat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#schemas/primitives/FloatProto.proto\022Op" + + "l.allegro.tech.hermes.consumers.consumer" + + ".sender.googlebigquery.avro.descriptor\" " + + "\n\017PrimitivesFloat\022\r\n\005field\030\001 \001(\002b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesFloat_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int32Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int32Proto.java new file mode 100644 index 0000000000..b474f3c387 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int32Proto.java @@ -0,0 +1,539 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/Int32Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class Int32Proto { + private Int32Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesInt32OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 field = 1; + * @return The field. + */ + int getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32} + */ + public static final class PrimitivesInt32 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32) + PrimitivesInt32OrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesInt32.newBuilder() to construct. + private PrimitivesInt32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesInt32() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesInt32(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesInt32( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + field_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private int field_; + /** + * int32 field = 1; + * @return The field. + */ + @java.lang.Override + public int getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != 0) { + output.writeInt32(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32) obj; + + if (getField() + != other.getField()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32.getDefaultInstance()) return this; + if (other.getField() != 0) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int field_ ; + /** + * int32 field = 1; + * @return The field. + */ + @java.lang.Override + public int getField() { + return field_; + } + /** + * int32 field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(int value) { + + field_ = value; + onChanged(); + return this; + } + /** + * int32 field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt32) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesInt32 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesInt32(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int32Proto.PrimitivesInt32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#schemas/primitives/Int32Proto.proto\022Op" + + "l.allegro.tech.hermes.consumers.consumer" + + ".sender.googlebigquery.avro.descriptor\" " + + "\n\017PrimitivesInt32\022\r\n\005field\030\001 \001(\005b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt32_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int64Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int64Proto.java new file mode 100644 index 0000000000..85ebbe6032 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/Int64Proto.java @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/Int64Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class Int64Proto { + private Int64Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesInt64OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 field = 1; + * @return The field. + */ + long getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64} + */ + public static final class PrimitivesInt64 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64) + PrimitivesInt64OrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesInt64.newBuilder() to construct. + private PrimitivesInt64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesInt64() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesInt64(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesInt64( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + field_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private long field_; + /** + * int64 field = 1; + * @return The field. + */ + @java.lang.Override + public long getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != 0L) { + output.writeInt64(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64) obj; + + if (getField() + != other.getField()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getField()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64.getDefaultInstance()) return this; + if (other.getField() != 0L) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long field_ ; + /** + * int64 field = 1; + * @return The field. + */ + @java.lang.Override + public long getField() { + return field_; + } + /** + * int64 field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(long value) { + + field_ = value; + onChanged(); + return this; + } + /** + * int64 field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesInt64) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesInt64 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesInt64(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.Int64Proto.PrimitivesInt64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#schemas/primitives/Int64Proto.proto\022Op" + + "l.allegro.tech.hermes.consumers.consumer" + + ".sender.googlebigquery.avro.descriptor\" " + + "\n\017PrimitivesInt64\022\r\n\005field\030\001 \001(\003b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesInt64_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBoolProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBoolProto.java new file mode 100644 index 0000000000..04df7dc010 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBoolProto.java @@ -0,0 +1,576 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NBoolProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NBoolProto { + private NBoolProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesBoolOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional bool field = 1; + * @return The field. + */ + boolean getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool} + */ + public static final class NullablePrimitivesBool extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool) + NullablePrimitivesBoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesBool.newBuilder() to construct. + private NullablePrimitivesBool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesBool() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesBool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesBool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + bitField0_ |= 0x00000001; + field_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private boolean field_; + /** + * optional bool field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional bool field = 1; + * @return The field. + */ + @java.lang.Override + public boolean getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (getField() + != other.getField()) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getField()); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool.getDefaultInstance()) return this; + if (other.hasField()) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean field_ ; + /** + * optional bool field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional bool field = 1; + * @return The field. + */ + @java.lang.Override + public boolean getField() { + return field_; + } + /** + * optional bool field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(boolean value) { + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional bool field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBool) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesBool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesBool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBoolProto.NullablePrimitivesBool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,schemas/primitives-nullable/NBoolProto" + + ".proto\022Opl.allegro.tech.hermes.consumers" + + ".consumer.sender.googlebigquery.avro.des" + + "criptor\"6\n\026NullablePrimitivesBool\022\022\n\005fie" + + "ld\030\001 \001(\010H\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBool_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBytesProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBytesProto.java new file mode 100644 index 0000000000..3d46e2934c --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NBytesProto.java @@ -0,0 +1,579 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NBytesProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NBytesProto { + private NBytesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesBytesOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bytes field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional bytes field = 1; + * @return The field. + */ + com.google.protobuf.ByteString getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes} + */ + public static final class NullablePrimitivesBytes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes) + NullablePrimitivesBytesOrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesBytes.newBuilder() to construct. + private NullablePrimitivesBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesBytes() { + field_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesBytes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesBytes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + bitField0_ |= 0x00000001; + field_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString field_; + /** + * optional bytes field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional bytes field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBytes(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + to_bitField0_ |= 0x00000001; + } + result.field_ = field_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes.getDefaultInstance()) return this; + if (other.hasField()) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString field_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional bytes field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getField() { + return field_; + } + /** + * optional bytes field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional bytes field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesBytes) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesBytes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesBytes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NBytesProto.NullablePrimitivesBytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-schemas/primitives-nullable/NBytesProt" + + "o.proto\022Opl.allegro.tech.hermes.consumer" + + "s.consumer.sender.googlebigquery.avro.de" + + "scriptor\"7\n\027NullablePrimitivesBytes\022\022\n\005f" + + "ield\030\001 \001(\014H\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesBytes_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NDoubleProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NDoubleProto.java new file mode 100644 index 0000000000..d1ecd34aae --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NDoubleProto.java @@ -0,0 +1,577 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NDoubleProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NDoubleProto { + private NDoubleProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesDoubleOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble) + com.google.protobuf.MessageOrBuilder { + + /** + * optional double field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional double field = 1; + * @return The field. + */ + double getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble} + */ + public static final class NullablePrimitivesDouble extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble) + NullablePrimitivesDoubleOrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesDouble.newBuilder() to construct. + private NullablePrimitivesDouble(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesDouble() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesDouble(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesDouble( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + bitField0_ |= 0x00000001; + field_ = input.readDouble(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private double field_; + /** + * optional double field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional double field = 1; + * @return The field. + */ + @java.lang.Override + public double getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (java.lang.Double.doubleToLongBits(getField()) + != java.lang.Double.doubleToLongBits( + other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getField())); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDoubleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble.getDefaultInstance()) return this; + if (other.hasField()) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private double field_ ; + /** + * optional double field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional double field = 1; + * @return The field. + */ + @java.lang.Override + public double getField() { + return field_; + } + /** + * optional double field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(double value) { + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional double field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesDouble) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesDouble parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesDouble(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NDoubleProto.NullablePrimitivesDouble getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.schemas/primitives-nullable/NDoublePro" + + "to.proto\022Opl.allegro.tech.hermes.consume" + + "rs.consumer.sender.googlebigquery.avro.d" + + "escriptor\"8\n\030NullablePrimitivesDouble\022\022\n" + + "\005field\030\001 \001(\001H\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesDouble_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NFloatProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NFloatProto.java new file mode 100644 index 0000000000..26841a1ba0 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NFloatProto.java @@ -0,0 +1,577 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NFloatProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NFloatProto { + private NFloatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesFloatOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional float field = 1; + * @return The field. + */ + float getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat} + */ + public static final class NullablePrimitivesFloat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat) + NullablePrimitivesFloatOrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesFloat.newBuilder() to construct. + private NullablePrimitivesFloat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesFloat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesFloat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesFloat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + bitField0_ |= 0x00000001; + field_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private float field_; + /** + * optional float field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional float field = 1; + * @return The field. + */ + @java.lang.Override + public float getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (java.lang.Float.floatToIntBits(getField()) + != java.lang.Float.floatToIntBits( + other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getField()); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0F; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat.getDefaultInstance()) return this; + if (other.hasField()) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private float field_ ; + /** + * optional float field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional float field = 1; + * @return The field. + */ + @java.lang.Override + public float getField() { + return field_; + } + /** + * optional float field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(float value) { + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional float field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesFloat) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesFloat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesFloat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NFloatProto.NullablePrimitivesFloat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-schemas/primitives-nullable/NFloatProt" + + "o.proto\022Opl.allegro.tech.hermes.consumer" + + "s.consumer.sender.googlebigquery.avro.de" + + "scriptor\"7\n\027NullablePrimitivesFloat\022\022\n\005f" + + "ield\030\001 \001(\002H\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesFloat_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt32Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt32Proto.java new file mode 100644 index 0000000000..2a23c7090b --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt32Proto.java @@ -0,0 +1,575 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NInt32Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NInt32Proto { + private NInt32Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesInt32OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional int32 field = 1; + * @return The field. + */ + int getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32} + */ + public static final class NullablePrimitivesInt32 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32) + NullablePrimitivesInt32OrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesInt32.newBuilder() to construct. + private NullablePrimitivesInt32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesInt32() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesInt32(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesInt32( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + bitField0_ |= 0x00000001; + field_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private int field_; + /** + * optional int32 field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional int32 field = 1; + * @return The field. + */ + @java.lang.Override + public int getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (getField() + != other.getField()) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32.getDefaultInstance()) return this; + if (other.hasField()) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int field_ ; + /** + * optional int32 field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional int32 field = 1; + * @return The field. + */ + @java.lang.Override + public int getField() { + return field_; + } + /** + * optional int32 field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(int value) { + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional int32 field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt32) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesInt32 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesInt32(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt32Proto.NullablePrimitivesInt32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-schemas/primitives-nullable/NInt32Prot" + + "o.proto\022Opl.allegro.tech.hermes.consumer" + + "s.consumer.sender.googlebigquery.avro.de" + + "scriptor\"7\n\027NullablePrimitivesInt32\022\022\n\005f" + + "ield\030\001 \001(\005H\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt32_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt64Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt64Proto.java new file mode 100644 index 0000000000..fea777a5fa --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NInt64Proto.java @@ -0,0 +1,576 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NInt64Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NInt64Proto { + private NInt64Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesInt64OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional int64 field = 1; + * @return The field. + */ + long getField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64} + */ + public static final class NullablePrimitivesInt64 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64) + NullablePrimitivesInt64OrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesInt64.newBuilder() to construct. + private NullablePrimitivesInt64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesInt64() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesInt64(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesInt64( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + bitField0_ |= 0x00000001; + field_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private long field_; + /** + * optional int64 field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional int64 field = 1; + * @return The field. + */ + @java.lang.Override + public long getField() { + return field_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (getField() + != other.getField()) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getField()); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64.getDefaultInstance()) return this; + if (other.hasField()) { + setField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long field_ ; + /** + * optional int64 field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional int64 field = 1; + * @return The field. + */ + @java.lang.Override + public long getField() { + return field_; + } + /** + * optional int64 field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(long value) { + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional int64 field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesInt64) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesInt64 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesInt64(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NInt64Proto.NullablePrimitivesInt64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-schemas/primitives-nullable/NInt64Prot" + + "o.proto\022Opl.allegro.tech.hermes.consumer" + + "s.consumer.sender.googlebigquery.avro.de" + + "scriptor\"7\n\027NullablePrimitivesInt64\022\022\n\005f" + + "ield\030\001 \001(\003H\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesInt64_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NStringProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NStringProto.java new file mode 100644 index 0000000000..5e7e9cdfde --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/NStringProto.java @@ -0,0 +1,655 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-nullable/NStringProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class NStringProto { + private NStringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface NullablePrimitivesStringOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * optional string field = 1; + * @return The field. + */ + java.lang.String getField(); + /** + * optional string field = 1; + * @return The bytes for field. + */ + com.google.protobuf.ByteString + getFieldBytes(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString} + */ + public static final class NullablePrimitivesString extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString) + NullablePrimitivesStringOrBuilder { + private static final long serialVersionUID = 0L; + // Use NullablePrimitivesString.newBuilder() to construct. + private NullablePrimitivesString(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NullablePrimitivesString() { + field_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NullablePrimitivesString(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NullablePrimitivesString( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + field_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.Builder.class); + } + + private int bitField0_; + public static final int FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object field_; + /** + * optional string field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional string field = 1; + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + * optional string field = 1; + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesStringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + to_bitField0_ |= 0x00000001; + } + result.field_ = field_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString.getDefaultInstance()) return this; + if (other.hasField()) { + bitField0_ |= 0x00000001; + field_ = other.field_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object field_ = ""; + /** + * optional string field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional string field = 1; + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string field = 1; + * @return The bytes for field. + */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + /** + * optional string field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + bitField0_ = (bitField0_ & ~0x00000001); + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + * optional string field = 1; + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bitField0_ |= 0x00000001; + field_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NullablePrimitivesString) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NullablePrimitivesString parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NullablePrimitivesString(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.NStringProto.NullablePrimitivesString getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.schemas/primitives-nullable/NStringPro" + + "to.proto\022Opl.allegro.tech.hermes.consume" + + "rs.consumer.sender.googlebigquery.avro.d" + + "escriptor\"8\n\030NullablePrimitivesString\022\022\n" + + "\005field\030\001 \001(\tH\000\210\001\001B\010\n\006_fieldb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_NullablePrimitivesString_descriptor, + new java.lang.String[] { "Field", "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBoolProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBoolProto.java new file mode 100644 index 0000000000..67dca4d102 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBoolProto.java @@ -0,0 +1,1178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordBoolProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordBoolProto { + private RecordBoolProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesBoolOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool} + */ + public static final class RecordPrimitivesBool extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool) + RecordPrimitivesBoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesBool.newBuilder() to construct. + private RecordPrimitivesBool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesBool() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesBool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesBool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * bool value_field = 1; + * @return The valueField. + */ + boolean getValueField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + valueField_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private boolean valueField_; + /** + * bool value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public boolean getValueField() { + return valueField_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueField_ != false) { + output.writeBool(1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueField_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field) obj; + + if (getValueField() + != other.getValueField()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getValueField()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.getDefaultInstance()) return this; + if (other.getValueField() != false) { + setValueField(other.getValueField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean valueField_ ; + /** + * bool value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public boolean getValueField() { + return valueField_; + } + /** + * bool value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField(boolean value) { + + valueField_ = value; + onChanged(); + return this; + } + /** + * bool value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBool) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesBool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesBool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBoolProto.RecordPrimitivesBool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0schemas/primitives-records/RecordBoolP" + + "roto.proto\022Opl.allegro.tech.hermes.consu" + + "mers.consumer.sender.googlebigquery.avro" + + ".descriptor\"\260\001\n\024RecordPrimitivesBool\022z\n\005" + + "field\030\001 \001(\0132k.pl.allegro.tech.hermes.con" + + "sumers.consumer.sender.googlebigquery.av" + + "ro.descriptor.RecordPrimitivesBool.Field" + + "\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\010b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBool_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBytesProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBytesProto.java new file mode 100644 index 0000000000..30a6aeb087 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordBytesProto.java @@ -0,0 +1,1182 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordBytesProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordBytesProto { + private RecordBytesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesBytesOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes} + */ + public static final class RecordPrimitivesBytes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes) + RecordPrimitivesBytesOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesBytes.newBuilder() to construct. + private RecordPrimitivesBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesBytes() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesBytes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesBytes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes value_field = 1; + * @return The valueField. + */ + com.google.protobuf.ByteString getValueField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + valueField_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + valueField_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString valueField_; + /** + * bytes value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueField() { + return valueField_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!valueField_.isEmpty()) { + output.writeBytes(1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!valueField_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field) obj; + + if (!getValueField() + .equals(other.getValueField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getValueField().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.getDefaultInstance()) return this; + if (other.getValueField() != com.google.protobuf.ByteString.EMPTY) { + setValueField(other.getValueField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString valueField_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueField() { + return valueField_; + } + /** + * bytes value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + valueField_ = value; + onChanged(); + return this; + } + /** + * bytes value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = getDefaultInstance().getValueField(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesBytes) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesBytes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesBytes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordBytesProto.RecordPrimitivesBytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1schemas/primitives-records/RecordBytes" + + "Proto.proto\022Opl.allegro.tech.hermes.cons" + + "umers.consumer.sender.googlebigquery.avr" + + "o.descriptor\"\262\001\n\025RecordPrimitivesBytes\022{" + + "\n\005field\030\001 \001(\0132l.pl.allegro.tech.hermes.c" + + "onsumers.consumer.sender.googlebigquery." + + "avro.descriptor.RecordPrimitivesBytes.Fi" + + "eld\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\014b\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesBytes_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordDoubleProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordDoubleProto.java new file mode 100644 index 0000000000..7663b6f8ed --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordDoubleProto.java @@ -0,0 +1,1180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordDoubleProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordDoubleProto { + private RecordDoubleProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesDoubleOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble} + */ + public static final class RecordPrimitivesDouble extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble) + RecordPrimitivesDoubleOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesDouble.newBuilder() to construct. + private RecordPrimitivesDouble(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesDouble() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesDouble(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesDouble( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * double value_field = 1; + * @return The valueField. + */ + double getValueField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + + valueField_ = input.readDouble(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private double valueField_; + /** + * double value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public double getValueField() { + return valueField_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(valueField_) != 0) { + output.writeDouble(1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(valueField_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field) obj; + + if (java.lang.Double.doubleToLongBits(getValueField()) + != java.lang.Double.doubleToLongBits( + other.getValueField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValueField())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.getDefaultInstance()) return this; + if (other.getValueField() != 0D) { + setValueField(other.getValueField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double valueField_ ; + /** + * double value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public double getValueField() { + return valueField_; + } + /** + * double value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField(double value) { + + valueField_ = value; + onChanged(); + return this; + } + /** + * double value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDoubleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesDouble) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesDouble parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesDouble(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordDoubleProto.RecordPrimitivesDouble getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n2schemas/primitives-records/RecordDoubl" + + "eProto.proto\022Opl.allegro.tech.hermes.con" + + "sumers.consumer.sender.googlebigquery.av" + + "ro.descriptor\"\264\001\n\026RecordPrimitivesDouble" + + "\022|\n\005field\030\001 \001(\0132m.pl.allegro.tech.hermes" + + ".consumers.consumer.sender.googlebigquer" + + "y.avro.descriptor.RecordPrimitivesDouble" + + ".Field\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\001b\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesDouble_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordFloatProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordFloatProto.java new file mode 100644 index 0000000000..03ddbb3c05 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordFloatProto.java @@ -0,0 +1,1180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordFloatProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordFloatProto { + private RecordFloatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesFloatOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat} + */ + public static final class RecordPrimitivesFloat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat) + RecordPrimitivesFloatOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesFloat.newBuilder() to construct. + private RecordPrimitivesFloat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesFloat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesFloat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesFloat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * float value_field = 1; + * @return The valueField. + */ + float getValueField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + valueField_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private float valueField_; + /** + * float value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public float getValueField() { + return valueField_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(valueField_) != 0) { + output.writeFloat(1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(valueField_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field) obj; + + if (java.lang.Float.floatToIntBits(getValueField()) + != java.lang.Float.floatToIntBits( + other.getValueField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getValueField()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.getDefaultInstance()) return this; + if (other.getValueField() != 0F) { + setValueField(other.getValueField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float valueField_ ; + /** + * float value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public float getValueField() { + return valueField_; + } + /** + * float value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField(float value) { + + valueField_ = value; + onChanged(); + return this; + } + /** + * float value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesFloat) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesFloat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesFloat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordFloatProto.RecordPrimitivesFloat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1schemas/primitives-records/RecordFloat" + + "Proto.proto\022Opl.allegro.tech.hermes.cons" + + "umers.consumer.sender.googlebigquery.avr" + + "o.descriptor\"\262\001\n\025RecordPrimitivesFloat\022{" + + "\n\005field\030\001 \001(\0132l.pl.allegro.tech.hermes.c" + + "onsumers.consumer.sender.googlebigquery." + + "avro.descriptor.RecordPrimitivesFloat.Fi" + + "eld\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\002b\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesFloat_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt32Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt32Proto.java new file mode 100644 index 0000000000..7bf13480dc --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt32Proto.java @@ -0,0 +1,1178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordInt32Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordInt32Proto { + private RecordInt32Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesInt32OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32} + */ + public static final class RecordPrimitivesInt32 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32) + RecordPrimitivesInt32OrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesInt32.newBuilder() to construct. + private RecordPrimitivesInt32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesInt32() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesInt32(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesInt32( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 value_field = 1; + * @return The valueField. + */ + int getValueField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + valueField_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private int valueField_; + /** + * int32 value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public int getValueField() { + return valueField_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueField_ != 0) { + output.writeInt32(1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueField_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field) obj; + + if (getValueField() + != other.getValueField()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getValueField(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.getDefaultInstance()) return this; + if (other.getValueField() != 0) { + setValueField(other.getValueField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueField_ ; + /** + * int32 value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public int getValueField() { + return valueField_; + } + /** + * int32 value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField(int value) { + + valueField_ = value; + onChanged(); + return this; + } + /** + * int32 value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt32) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesInt32 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesInt32(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt32Proto.RecordPrimitivesInt32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1schemas/primitives-records/RecordInt32" + + "Proto.proto\022Opl.allegro.tech.hermes.cons" + + "umers.consumer.sender.googlebigquery.avr" + + "o.descriptor\"\262\001\n\025RecordPrimitivesInt32\022{" + + "\n\005field\030\001 \001(\0132l.pl.allegro.tech.hermes.c" + + "onsumers.consumer.sender.googlebigquery." + + "avro.descriptor.RecordPrimitivesInt32.Fi" + + "eld\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\005b\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt32_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt64Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt64Proto.java new file mode 100644 index 0000000000..fd36a58f68 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordInt64Proto.java @@ -0,0 +1,1179 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordInt64Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordInt64Proto { + private RecordInt64Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesInt64OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64} + */ + public static final class RecordPrimitivesInt64 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64) + RecordPrimitivesInt64OrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesInt64.newBuilder() to construct. + private RecordPrimitivesInt64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesInt64() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesInt64(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesInt64( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 value_field = 1; + * @return The valueField. + */ + long getValueField(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + valueField_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private long valueField_; + /** + * int64 value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public long getValueField() { + return valueField_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueField_ != 0L) { + output.writeInt64(1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueField_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field) obj; + + if (getValueField() + != other.getValueField()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getValueField()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.getDefaultInstance()) return this; + if (other.getValueField() != 0L) { + setValueField(other.getValueField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long valueField_ ; + /** + * int64 value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public long getValueField() { + return valueField_; + } + /** + * int64 value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField(long value) { + + valueField_ = value; + onChanged(); + return this; + } + /** + * int64 value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesInt64) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesInt64 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesInt64(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordInt64Proto.RecordPrimitivesInt64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1schemas/primitives-records/RecordInt64" + + "Proto.proto\022Opl.allegro.tech.hermes.cons" + + "umers.consumer.sender.googlebigquery.avr" + + "o.descriptor\"\262\001\n\025RecordPrimitivesInt64\022{" + + "\n\005field\030\001 \001(\0132l.pl.allegro.tech.hermes.c" + + "onsumers.consumer.sender.googlebigquery." + + "avro.descriptor.RecordPrimitivesInt64.Fi" + + "eld\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\003b\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesInt64_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordStringProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordStringProto.java new file mode 100644 index 0000000000..0e1795e756 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/RecordStringProto.java @@ -0,0 +1,1258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-records/RecordStringProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class RecordStringProto { + private RecordStringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecordPrimitivesStringOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString) + com.google.protobuf.MessageOrBuilder { + + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + * @return The field. + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field getField(); + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder getFieldOrBuilder(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString} + */ + public static final class RecordPrimitivesString extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString) + RecordPrimitivesStringOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecordPrimitivesString.newBuilder() to construct. + private RecordPrimitivesString(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordPrimitivesString() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordPrimitivesString(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordPrimitivesString( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Builder.class); + } + + public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * string value_field = 1; + * @return The valueField. + */ + java.lang.String getValueField(); + /** + * string value_field = 1; + * @return The bytes for valueField. + */ + com.google.protobuf.ByteString + getValueFieldBytes(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field} + */ + public static final class Field extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Field() { + valueField_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Field(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + valueField_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder.class); + } + + public static final int VALUE_FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object valueField_; + /** + * string value_field = 1; + * @return The valueField. + */ + @java.lang.Override + public java.lang.String getValueField() { + java.lang.Object ref = valueField_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueField_ = s; + return s; + } + } + /** + * string value_field = 1; + * @return The bytes for valueField. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueFieldBytes() { + java.lang.Object ref = valueField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valueField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, valueField_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, valueField_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field) obj; + + if (!getValueField() + .equals(other.getValueField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getValueField().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueField_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field(this); + result.valueField_ = valueField_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.getDefaultInstance()) return this; + if (!other.getValueField().isEmpty()) { + valueField_ = other.valueField_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object valueField_ = ""; + /** + * string value_field = 1; + * @return The valueField. + */ + public java.lang.String getValueField() { + java.lang.Object ref = valueField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueField_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string value_field = 1; + * @return The bytes for valueField. + */ + public com.google.protobuf.ByteString + getValueFieldBytes() { + java.lang.Object ref = valueField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valueField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string value_field = 1; + * @param value The valueField to set. + * @return This builder for chaining. + */ + public Builder setValueField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + valueField_ = value; + onChanged(); + return this; + } + /** + * string value_field = 1; + * @return This builder for chaining. + */ + public Builder clearValueField() { + + valueField_ = getDefaultInstance().getValueField(); + onChanged(); + return this; + } + /** + * string value_field = 1; + * @param value The bytes for valueField to set. + * @return This builder for chaining. + */ + public Builder setValueFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + valueField_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_FIELD_NUMBER = 1; + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field field_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + * @return The field. + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field getField() { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.getDefaultInstance() : field_; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesStringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field field_; + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder> fieldBuilder_; + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + * @return The field. + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + public Builder setField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + public Builder setField( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + public Builder mergeField(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.getDefaultInstance() : field_; + } + } + /** + * .pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.Field.Builder, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString.FieldOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordPrimitivesString) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordPrimitivesString parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordPrimitivesString(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.RecordStringProto.RecordPrimitivesString getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n2schemas/primitives-records/RecordStrin" + + "gProto.proto\022Opl.allegro.tech.hermes.con" + + "sumers.consumer.sender.googlebigquery.av" + + "ro.descriptor\"\264\001\n\026RecordPrimitivesString" + + "\022|\n\005field\030\001 \001(\0132m.pl.allegro.tech.hermes" + + ".consumers.consumer.sender.googlebigquer" + + "y.avro.descriptor.RecordPrimitivesString" + + ".Field\032\034\n\005Field\022\023\n\013value_field\030\001 \001(\tb\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_RecordPrimitivesString_Field_descriptor, + new java.lang.String[] { "ValueField", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringProto.java new file mode 100644 index 0000000000..689d38409f --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringProto.java @@ -0,0 +1,620 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives/StringProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringProto { + private StringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString) + com.google.protobuf.MessageOrBuilder { + + /** + * string field = 1; + * @return The field. + */ + java.lang.String getField(); + /** + * string field = 1; + * @return The bytes for field. + */ + com.google.protobuf.ByteString + getFieldBytes(); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString} + */ + public static final class PrimitivesString extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString) + PrimitivesStringOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesString.newBuilder() to construct. + private PrimitivesString(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesString() { + field_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesString(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesString( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + field_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object field_; + /** + * string field = 1; + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + * string field = 1; + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString) obj; + + if (!getField() + .equals(other.getField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesStringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString(this); + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString.getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object field_ = ""; + /** + * string field = 1; + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string field = 1; + * @return The bytes for field. + */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + * string field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + * string field = 1; + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + field_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesString) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesString parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesString(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringProto.PrimitivesString getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n$schemas/primitives/StringProto.proto\022O" + + "pl.allegro.tech.hermes.consumers.consume" + + "r.sender.googlebigquery.avro.descriptor\"" + + "!\n\020PrimitivesString\022\r\n\005field\030\001 \001(\tb\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesString_descriptor, + new java.lang.String[] { "Field", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBoolProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBoolProto.java new file mode 100644 index 0000000000..5b47ba7dfa --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBoolProto.java @@ -0,0 +1,805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToBoolProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToBoolProto { + private StringToBoolProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToBoolOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, bool> field = 1; + */ + int getFieldCount(); + /** + * map<string, bool> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, bool> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, bool> field = 1; + */ + + boolean getFieldOrDefault( + java.lang.String key, + boolean defaultValue); + /** + * map<string, bool> field = 1; + */ + + boolean getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool} + */ + public static final class PrimitivesStringToBool extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool) + PrimitivesStringToBoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToBool.newBuilder() to construct. + private PrimitivesStringToBool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToBool() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToBool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToBool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Boolean> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.BOOL, + false); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Boolean> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, bool> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, bool> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, bool> field = 1; + */ + @java.lang.Override + + public boolean getFieldOrDefault( + java.lang.String key, + boolean defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, bool> field = 1; + */ + @java.lang.Override + + public boolean getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Boolean> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, bool> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, bool> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, bool> field = 1; + */ + @java.lang.Override + + public boolean getFieldOrDefault( + java.lang.String key, + boolean defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, bool> field = 1; + */ + @java.lang.Override + + public boolean getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, bool> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, bool> field = 1; + */ + public Builder putField( + java.lang.String key, + boolean value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, bool> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBool) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToBool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToBool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBoolProto.PrimitivesStringToBool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.schemas/primitives-map/StringToBoolPro" + + "to.proto\022Opl.allegro.tech.hermes.consume" + + "rs.consumer.sender.googlebigquery.avro.d" + + "escriptor\"\312\001\n\026PrimitivesStringToBool\022\201\001\n" + + "\005field\030\001 \003(\0132r.pl.allegro.tech.hermes.co" + + "nsumers.consumer.sender.googlebigquery.a" + + "vro.descriptor.PrimitivesStringToBool.Fi" + + "eldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\010:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBool_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBytesProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBytesProto.java new file mode 100644 index 0000000000..f1ba2c713b --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToBytesProto.java @@ -0,0 +1,810 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToBytesProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToBytesProto { + private StringToBytesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToBytesOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, bytes> field = 1; + */ + int getFieldCount(); + /** + * map<string, bytes> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, bytes> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, bytes> field = 1; + */ + + /* nullable */ +com.google.protobuf.ByteString getFieldOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.ByteString defaultValue); + /** + * map<string, bytes> field = 1; + */ + + com.google.protobuf.ByteString getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes} + */ + public static final class PrimitivesStringToBytes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes) + PrimitivesStringToBytesOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToBytes.newBuilder() to construct. + private PrimitivesStringToBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToBytes() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToBytes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToBytes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.ByteString> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.BYTES, + com.google.protobuf.ByteString.EMPTY); + } + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.ByteString> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, bytes> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, bytes> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, bytes> field = 1; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getFieldOrDefault( + java.lang.String key, + com.google.protobuf.ByteString defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, bytes> field = 1; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.ByteString> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, bytes> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, bytes> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, bytes> field = 1; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getFieldOrDefault( + java.lang.String key, + com.google.protobuf.ByteString defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, bytes> field = 1; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, bytes> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, bytes> field = 1; + */ + public Builder putField( + java.lang.String key, + com.google.protobuf.ByteString value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, bytes> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToBytes) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToBytes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToBytes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToBytesProto.PrimitivesStringToBytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-map/StringToBytesPr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"\314\001\n\027PrimitivesStringToBytes\022\202" + + "\001\n\005field\030\001 \003(\0132s.pl.allegro.tech.hermes." + + "consumers.consumer.sender.googlebigquery" + + ".avro.descriptor.PrimitivesStringToBytes" + + ".FieldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\014:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToBytes_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToDoubleProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToDoubleProto.java new file mode 100644 index 0000000000..9ea3ac800d --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToDoubleProto.java @@ -0,0 +1,805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToDoubleProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToDoubleProto { + private StringToDoubleProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToDoubleOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, double> field = 1; + */ + int getFieldCount(); + /** + * map<string, double> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, double> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, double> field = 1; + */ + + double getFieldOrDefault( + java.lang.String key, + double defaultValue); + /** + * map<string, double> field = 1; + */ + + double getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble} + */ + public static final class PrimitivesStringToDouble extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble) + PrimitivesStringToDoubleOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToDouble.newBuilder() to construct. + private PrimitivesStringToDouble(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToDouble() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToDouble(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToDouble( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Double> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, double> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, double> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, double> field = 1; + */ + @java.lang.Override + + public double getFieldOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, double> field = 1; + */ + @java.lang.Override + + public double getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDoubleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, double> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, double> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, double> field = 1; + */ + @java.lang.Override + + public double getFieldOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, double> field = 1; + */ + @java.lang.Override + + public double getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, double> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, double> field = 1; + */ + public Builder putField( + java.lang.String key, + double value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, double> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToDouble) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToDouble parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToDouble(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToDoubleProto.PrimitivesStringToDouble getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0schemas/primitives-map/StringToDoubleP" + + "roto.proto\022Opl.allegro.tech.hermes.consu" + + "mers.consumer.sender.googlebigquery.avro" + + ".descriptor\"\316\001\n\030PrimitivesStringToDouble" + + "\022\203\001\n\005field\030\001 \003(\0132t.pl.allegro.tech.herme" + + "s.consumers.consumer.sender.googlebigque" + + "ry.avro.descriptor.PrimitivesStringToDou" + + "ble.FieldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\001:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToDouble_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToFloatProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToFloatProto.java new file mode 100644 index 0000000000..0ad986eed1 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToFloatProto.java @@ -0,0 +1,805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToFloatProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToFloatProto { + private StringToFloatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToFloatOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, float> field = 1; + */ + int getFieldCount(); + /** + * map<string, float> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, float> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, float> field = 1; + */ + + float getFieldOrDefault( + java.lang.String key, + float defaultValue); + /** + * map<string, float> field = 1; + */ + + float getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat} + */ + public static final class PrimitivesStringToFloat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat) + PrimitivesStringToFloatOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToFloat.newBuilder() to construct. + private PrimitivesStringToFloat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToFloat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToFloat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToFloat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Float> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.FLOAT, + 0F); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Float> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, float> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, float> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, float> field = 1; + */ + @java.lang.Override + + public float getFieldOrDefault( + java.lang.String key, + float defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, float> field = 1; + */ + @java.lang.Override + + public float getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Float> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, float> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, float> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, float> field = 1; + */ + @java.lang.Override + + public float getFieldOrDefault( + java.lang.String key, + float defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, float> field = 1; + */ + @java.lang.Override + + public float getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, float> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, float> field = 1; + */ + public Builder putField( + java.lang.String key, + float value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, float> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToFloat) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToFloat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToFloat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToFloatProto.PrimitivesStringToFloat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-map/StringToFloatPr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"\314\001\n\027PrimitivesStringToFloat\022\202" + + "\001\n\005field\030\001 \003(\0132s.pl.allegro.tech.hermes." + + "consumers.consumer.sender.googlebigquery" + + ".avro.descriptor.PrimitivesStringToFloat" + + ".FieldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\002:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToFloat_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt32Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt32Proto.java new file mode 100644 index 0000000000..7363a3da56 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt32Proto.java @@ -0,0 +1,805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToInt32Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToInt32Proto { + private StringToInt32Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToInt32OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, int32> field = 1; + */ + int getFieldCount(); + /** + * map<string, int32> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, int32> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, int32> field = 1; + */ + + int getFieldOrDefault( + java.lang.String key, + int defaultValue); + /** + * map<string, int32> field = 1; + */ + + int getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32} + */ + public static final class PrimitivesStringToInt32 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32) + PrimitivesStringToInt32OrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToInt32.newBuilder() to construct. + private PrimitivesStringToInt32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToInt32() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToInt32(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToInt32( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Integer> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Integer> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, int32> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, int32> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, int32> field = 1; + */ + @java.lang.Override + + public int getFieldOrDefault( + java.lang.String key, + int defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, int32> field = 1; + */ + @java.lang.Override + + public int getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Integer> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, int32> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, int32> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, int32> field = 1; + */ + @java.lang.Override + + public int getFieldOrDefault( + java.lang.String key, + int defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, int32> field = 1; + */ + @java.lang.Override + + public int getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, int32> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, int32> field = 1; + */ + public Builder putField( + java.lang.String key, + int value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, int32> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt32) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToInt32 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToInt32(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt32Proto.PrimitivesStringToInt32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-map/StringToInt32Pr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"\314\001\n\027PrimitivesStringToInt32\022\202" + + "\001\n\005field\030\001 \003(\0132s.pl.allegro.tech.hermes." + + "consumers.consumer.sender.googlebigquery" + + ".avro.descriptor.PrimitivesStringToInt32" + + ".FieldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\005:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt32_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt64Proto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt64Proto.java new file mode 100644 index 0000000000..6795a52918 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToInt64Proto.java @@ -0,0 +1,805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToInt64Proto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToInt64Proto { + private StringToInt64Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToInt64OrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, int64> field = 1; + */ + int getFieldCount(); + /** + * map<string, int64> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, int64> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, int64> field = 1; + */ + + long getFieldOrDefault( + java.lang.String key, + long defaultValue); + /** + * map<string, int64> field = 1; + */ + + long getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64} + */ + public static final class PrimitivesStringToInt64 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64) + PrimitivesStringToInt64OrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToInt64.newBuilder() to construct. + private PrimitivesStringToInt64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToInt64() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToInt64(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToInt64( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, int64> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, int64> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, int64> field = 1; + */ + @java.lang.Override + + public long getFieldOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, int64> field = 1; + */ + @java.lang.Override + + public long getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, int64> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, int64> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, int64> field = 1; + */ + @java.lang.Override + + public long getFieldOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, int64> field = 1; + */ + @java.lang.Override + + public long getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, int64> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, int64> field = 1; + */ + public Builder putField( + java.lang.String key, + long value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, int64> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToInt64) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToInt64 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToInt64(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToInt64Proto.PrimitivesStringToInt64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n/schemas/primitives-map/StringToInt64Pr" + + "oto.proto\022Opl.allegro.tech.hermes.consum" + + "ers.consumer.sender.googlebigquery.avro." + + "descriptor\"\314\001\n\027PrimitivesStringToInt64\022\202" + + "\001\n\005field\030\001 \003(\0132s.pl.allegro.tech.hermes." + + "consumers.consumer.sender.googlebigquery" + + ".avro.descriptor.PrimitivesStringToInt64" + + ".FieldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\003:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToInt64_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToStringProto.java b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToStringProto.java new file mode 100644 index 0000000000..4ee1ef8161 --- /dev/null +++ b/hermes-consumers/src/test/java/pl/allegro/tech/hermes/consumers/consumer/sender/googlebigquery/avro/descriptor/StringToStringProto.java @@ -0,0 +1,810 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schemas/primitives-map/StringToStringProto.proto + +package pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor; + +public final class StringToStringProto { + private StringToStringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PrimitivesStringToStringOrBuilder extends + // @@protoc_insertion_point(interface_extends:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, string> field = 1; + */ + int getFieldCount(); + /** + * map<string, string> field = 1; + */ + boolean containsField( + java.lang.String key); + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getField(); + /** + * map<string, string> field = 1; + */ + java.util.Map + getFieldMap(); + /** + * map<string, string> field = 1; + */ + + /* nullable */ +java.lang.String getFieldOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> field = 1; + */ + + java.lang.String getFieldOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString} + */ + public static final class PrimitivesStringToString extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString) + PrimitivesStringToStringOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrimitivesStringToString.newBuilder() to construct. + private PrimitivesStringToString(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitivesStringToString() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitivesStringToString(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitivesStringToString( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + field__ = input.readMessage( + FieldDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + field_.getMutableMap().put( + field__.getKey(), field__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private static final class FieldDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_FieldEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, string> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, string> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, string> field = 1; + */ + @java.lang.Override + + public java.lang.String getFieldOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> field = 1; + */ + @java.lang.Override + + public java.lang.String getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetField(), + FieldDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetField().getMap().entrySet()) { + com.google.protobuf.MapEntry + field__ = FieldDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, field__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString)) { + return super.equals(obj); + } + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString other = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString) obj; + + if (!internalGetField().equals( + other.internalGetField())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetField().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + internalGetField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString) + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToStringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableField(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.class, pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.Builder.class); + } + + // Construct using pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableField().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString getDefaultInstanceForType() { + return pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.getDefaultInstance(); + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString build() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString buildPartial() { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString result = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString(this); + int from_bitField0_ = bitField0_; + result.field_ = internalGetField(); + result.field_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString) { + return mergeFrom((pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString other) { + if (other == pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString.getDefaultInstance()) return this; + internalGetMutableField().mergeFrom( + other.internalGetField()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> field_; + private com.google.protobuf.MapField + internalGetField() { + if (field_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldDefaultEntryHolder.defaultEntry); + } + return field_; + } + private com.google.protobuf.MapField + internalGetMutableField() { + onChanged();; + if (field_ == null) { + field_ = com.google.protobuf.MapField.newMapField( + FieldDefaultEntryHolder.defaultEntry); + } + if (!field_.isMutable()) { + field_ = field_.copy(); + } + return field_; + } + + public int getFieldCount() { + return internalGetField().getMap().size(); + } + /** + * map<string, string> field = 1; + */ + + @java.lang.Override + public boolean containsField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetField().getMap().containsKey(key); + } + /** + * Use {@link #getFieldMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getField() { + return getFieldMap(); + } + /** + * map<string, string> field = 1; + */ + @java.lang.Override + + public java.util.Map getFieldMap() { + return internalGetField().getMap(); + } + /** + * map<string, string> field = 1; + */ + @java.lang.Override + + public java.lang.String getFieldOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> field = 1; + */ + @java.lang.Override + + public java.lang.String getFieldOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetField().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearField() { + internalGetMutableField().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> field = 1; + */ + + public Builder removeField( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableField().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableField() { + return internalGetMutableField().getMutableMap(); + } + /** + * map<string, string> field = 1; + */ + public Builder putField( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableField().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, string> field = 1; + */ + + public Builder putAllField( + java.util.Map values) { + internalGetMutableField().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString) + } + + // @@protoc_insertion_point(class_scope:pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.PrimitivesStringToString) + private static final pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString(); + } + + public static pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitivesStringToString parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitivesStringToString(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pl.allegro.tech.hermes.consumers.consumer.sender.googlebigquery.avro.descriptor.StringToStringProto.PrimitivesStringToString getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_FieldEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_FieldEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0schemas/primitives-map/StringToStringP" + + "roto.proto\022Opl.allegro.tech.hermes.consu" + + "mers.consumer.sender.googlebigquery.avro" + + ".descriptor\"\316\001\n\030PrimitivesStringToString" + + "\022\203\001\n\005field\030\001 \003(\0132t.pl.allegro.tech.herme" + + "s.consumers.consumer.sender.googlebigque" + + "ry.avro.descriptor.PrimitivesStringToStr" + + "ing.FieldEntry\032,\n\nFieldEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor, + new java.lang.String[] { "Field", }); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_FieldEntry_descriptor = + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_descriptor.getNestedTypes().get(0); + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_FieldEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pl_allegro_tech_hermes_consumers_consumer_sender_googlebigquery_avro_descriptor_PrimitivesStringToString_FieldEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/boolean.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/boolean.avsc new file mode 100644 index 0000000000..7ceb085e36 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/boolean.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "boolean" + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/bytes.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/bytes.avsc new file mode 100644 index 0000000000..57ed641f2d --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/bytes.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "bytes" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/double.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/double.avsc new file mode 100644 index 0000000000..2e541edde6 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/double.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "double" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/float.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/float.avsc new file mode 100644 index 0000000000..d691bff493 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/float.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "float" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/int.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/int.avsc new file mode 100644 index 0000000000..6631d225c3 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/int.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "int" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/long.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/long.avsc new file mode 100644 index 0000000000..bdd0062448 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/long.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "long" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/array-primitives/string.avsc b/hermes-consumers/src/test/resources/schemas/array-primitives/string.avsc new file mode 100644 index 0000000000..8878691df4 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/array-primitives/string.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "array", + "items": "string" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/boolean.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/boolean.avsc new file mode 100644 index 0000000000..4c0fe4fcac --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/boolean.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "boolean", + "default": true + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/bytes.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/bytes.avsc new file mode 100644 index 0000000000..fe9bb1d2f2 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/bytes.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "bytes", + "default": "\u0074\u0065\u0073\u0074" + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/double.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/double.avsc new file mode 100644 index 0000000000..4bcb418a48 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/double.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "double", + "default": 3.14 + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/float.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/float.avsc new file mode 100644 index 0000000000..bf2fd45c8d --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/float.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "float", + "default": 3.14 + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/int.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/int.avsc new file mode 100644 index 0000000000..dfa18d67e3 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/int.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "int", + "default": 997 + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/long.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/long.avsc new file mode 100644 index 0000000000..9687f1ad83 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/long.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "long", + "default": 1614322339997 + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/default-primitives/string.avsc b/hermes-consumers/src/test/resources/schemas/default-primitives/string.avsc new file mode 100644 index 0000000000..b13ec4d618 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/default-primitives/string.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "string", + "default": "Z sejmu dla Faktów Katarzyna Bolesna-Mordęga" + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/defaults/array-with-default-items.avsc b/hermes-consumers/src/test/resources/schemas/defaults/array-with-default-items.avsc new file mode 100644 index 0000000000..37dd681ef8 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/array-with-default-items.avsc @@ -0,0 +1,17 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "array_ints_field", + "type": { + "type": "array", + "items": { + "type": "int", + "default": 1 + } + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/array-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/array-with-default.avsc new file mode 100644 index 0000000000..2d180d1cad --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/array-with-default.avsc @@ -0,0 +1,17 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "array_ints_field", + "type": { + "type": "array", + "items": { + "type": "int" + } + }, + "default": [9, 9, 7] + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/enum-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/enum-with-default.avsc new file mode 100644 index 0000000000..408dd7d40c --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/enum-with-default.avsc @@ -0,0 +1,19 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "enum_field", + "type": { + "type": "enum", + "name": "TestEnum", + "symbols": [ + "TEST1", + "TEST2" + ] + }, + "default": "TEST1" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/map-with-default-values.avsc b/hermes-consumers/src/test/resources/schemas/defaults/map-with-default-values.avsc new file mode 100644 index 0000000000..a60be9c1d5 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/map-with-default-values.avsc @@ -0,0 +1,17 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "map_of_ints_field", + "type": { + "type": "map", + "values": { + "type": "int", + "default": 1 + } + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/map-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/map-with-default.avsc new file mode 100644 index 0000000000..08993da7a8 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/map-with-default.avsc @@ -0,0 +1,21 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "map_of_ints_field", + "type": { + "type": "map", + "values": { + "type": "int" + } + }, + "default": { + "policja": 997, + "straż pożarna": 998, + "pogotowie": 999 + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/primitive-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/primitive-with-default.avsc new file mode 100644 index 0000000000..9adad38bd0 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/primitive-with-default.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "int_field", + "type": "int", + "default": 1 + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/record-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/record-with-default.avsc new file mode 100644 index 0000000000..72a030d210 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/record-with-default.avsc @@ -0,0 +1,23 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "record_ints_field", + "type": { + "name": "int", + "type": "record", + "fields": [ + { + "name": "int_value_field", + "type": "int" + } + ] + }, + "default": { + "int_value_field": 997 + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/string-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/string-with-default.avsc new file mode 100644 index 0000000000..38f2c39691 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/string-with-default.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "str_field", + "type": "string", + "default": "test" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/defaults/union-with-default.avsc b/hermes-consumers/src/test/resources/schemas/defaults/union-with-default.avsc new file mode 100644 index 0000000000..16d78d7671 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/defaults/union-with-default.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Union", + "type": "record", + "fields": [ + { + "name": "int_field", + "type": [ + "int" + ], + "default": 1 + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/boolean.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/boolean.avsc new file mode 100644 index 0000000000..d5a364c74a --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/boolean.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "boolean" + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/bytes.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/bytes.avsc new file mode 100644 index 0000000000..876faf98f2 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/bytes.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "bytes" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/double.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/double.avsc new file mode 100644 index 0000000000..0670eca7f7 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/double.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "double" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/float.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/float.avsc new file mode 100644 index 0000000000..3a78015b4b --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/float.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "float" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/int.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/int.avsc new file mode 100644 index 0000000000..85b8fcc478 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/int.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "int" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/long.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/long.avsc new file mode 100644 index 0000000000..32ecac44cd --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/long.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "long" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/map-primitives/string.avsc b/hermes-consumers/src/test/resources/schemas/map-primitives/string.avsc new file mode 100644 index 0000000000..afac4eebe5 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/map-primitives/string.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "MapPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "type": "map", + "values": "string" + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/boolean.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/boolean.avsc new file mode 100644 index 0000000000..4d10140687 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/boolean.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": ["null", "boolean"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/bytes.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/bytes.avsc new file mode 100644 index 0000000000..a032332b8b --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/bytes.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": ["null", "bytes"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/double.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/double.avsc new file mode 100644 index 0000000000..53162618a2 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/double.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": ["null", "double"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/float.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/float.avsc new file mode 100644 index 0000000000..942f1331ca --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/float.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": ["null", "float"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/int.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/int.avsc new file mode 100644 index 0000000000..bbd3cddc9a --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/int.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": ["null", "int"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/long.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/long.avsc new file mode 100644 index 0000000000..24ce3aae0a --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/long.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": ["null", "long"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/nullable-primitives/string.avsc b/hermes-consumers/src/test/resources/schemas/nullable-primitives/string.avsc new file mode 100644 index 0000000000..dbaa665db3 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/nullable-primitives/string.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "NullablePrimitives", + "type": "record", + "comment": "Look at https://github.com/apache/avro/blob/master/lang/csharp/src/apache/perf/schema.avsc", + "todo": "Fixed field doesn't work during parsing schema :|", + "fields": [ + { + "name": "field", + "type": ["null", "string"] + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/primitives/boolean.avsc b/hermes-consumers/src/test/resources/schemas/primitives/boolean.avsc new file mode 100644 index 0000000000..2bd45f1f7d --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/boolean.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "boolean" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/primitives/bytes.avsc b/hermes-consumers/src/test/resources/schemas/primitives/bytes.avsc new file mode 100644 index 0000000000..52fd10ceac --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/bytes.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "bytes" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/primitives/double.avsc b/hermes-consumers/src/test/resources/schemas/primitives/double.avsc new file mode 100644 index 0000000000..72b69c6caa --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/double.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "double" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/primitives/float.avsc b/hermes-consumers/src/test/resources/schemas/primitives/float.avsc new file mode 100644 index 0000000000..3a7de4335f --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/float.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "float" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/primitives/int.avsc b/hermes-consumers/src/test/resources/schemas/primitives/int.avsc new file mode 100644 index 0000000000..70c00a5e12 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/int.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "int" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/primitives/long.avsc b/hermes-consumers/src/test/resources/schemas/primitives/long.avsc new file mode 100644 index 0000000000..390a9056ac --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/long.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "long" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/primitives/string.avsc b/hermes-consumers/src/test/resources/schemas/primitives/string.avsc new file mode 100644 index 0000000000..f144fb0ee6 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/primitives/string.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "Primitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": "string" + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/boolean.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/boolean.avsc new file mode 100644 index 0000000000..7fc6f8b0bd --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/boolean.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "boolean", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "boolean" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/bytes.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/bytes.avsc new file mode 100644 index 0000000000..71f547799d --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/bytes.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "bytes", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "bytes" + } + ] + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/double.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/double.avsc new file mode 100644 index 0000000000..0f6f1da57c --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/double.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "double", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "double" + } + ] + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/float.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/float.avsc new file mode 100644 index 0000000000..5b1857ad6c --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/float.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "float", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "float" + } + ] + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/int.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/int.avsc new file mode 100644 index 0000000000..ec9b854b3e --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/int.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "string", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "int" + } + ] + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/long.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/long.avsc new file mode 100644 index 0000000000..5971e8575c --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/long.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "long", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "long" + } + ] + } + } + ] +} diff --git a/hermes-consumers/src/test/resources/schemas/record-primitives/string.avsc b/hermes-consumers/src/test/resources/schemas/record-primitives/string.avsc new file mode 100644 index 0000000000..64135055f0 --- /dev/null +++ b/hermes-consumers/src/test/resources/schemas/record-primitives/string.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "pl.allegro.bigdata.avro.gcpavrotools", + "name": "RecordPrimitives", + "type": "record", + "fields": [ + { + "name": "field", + "type": { + "name": "string", + "type": "record", + "fields": [ + { + "name": "value_field", + "type": "string" + } + ] + } + } + ] +}