From bddc1d1eecbd04e3260304796e58ffeb6c163e47 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Thu, 9 Jul 2020 17:01:35 -0700 Subject: [PATCH] feat: initialize the generator --- README.md | 14 + gen.sh | 67 + src/google/events/cloud/audit/v1/Data.java | 5982 +++++++++++ .../events/cloud/firestore/v1/Data.java | 9136 +++++++++++++++++ src/google/events/cloud/pubsub/v1/Data.java | 2070 ++++ .../events/cloud/scheduler/v1/Data.java | 570 + src/google/events/cloud/storage/v1/Data.java | 6868 +++++++++++++ src/google/events/firebase/v1/Data.java | 1500 +++ 8 files changed, 26207 insertions(+) create mode 100755 gen.sh create mode 100644 src/google/events/cloud/audit/v1/Data.java create mode 100644 src/google/events/cloud/firestore/v1/Data.java create mode 100644 src/google/events/cloud/pubsub/v1/Data.java create mode 100644 src/google/events/cloud/scheduler/v1/Data.java create mode 100644 src/google/events/cloud/storage/v1/Data.java create mode 100644 src/google/events/firebase/v1/Data.java diff --git a/README.md b/README.md index 56c015f7..07e16721 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ # Google CloudEvents – Java This repository contains types for CloudEvents issued by Google. + +## Prerequisites + +- Java 7 (or higher) + +## Generate + +Generate libraries: + +```sh +./gen.sh +``` + +Observe the new files in `src/`. \ No newline at end of file diff --git a/gen.sh b/gen.sh new file mode 100755 index 00000000..b30ba172 --- /dev/null +++ b/gen.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Script to generate the Protobuf classes from googleapis/google-cloudevents +set -e + +echo "~ START" +PROTOBUF_VERSION=3.12.3 + +# protoc is a native application, so we need to download different zip files +# and use different binaries depending on the OS. +echo "- Determining OS type" +case "$OSTYPE" in + darwin*) + PROTOBUF_PLATFORM=osx-x86_64 + PROTOC=tmp/protobuf/bin/protoc + ;; + linux*) + PROTOBUF_PLATFORM=linux-x64_64 + PROTOC=tmp/protobuf/bin/protoc + ;; + win* | msys* | cygwin*) + PROTOBUF_PLATFORM=win64 + PROTOC=tmp/protobuf/bin/protoc.exe + ;; + *) + echo "Unknown OSTYPE: $OSTYPE" + exit 1 +esac + +echo "- Cloning github.com/googleapis/google-cloudevents into tmp" +# For the moment, just clone google-cloudevents. Later we might make +# it a submodule. We clone quietly, and only with a depth of 1 +# as we don't need history. +rm -rf tmp +mkdir -p tmp +git clone https://github.com/googleapis/google-cloudevents tmp/google-cloudevents -q --depth 1 + +# We download a specific version rather than using package managers +# for portability and being able to rely on the version being available +# as soon as it's released on GitHub. +echo "- Downloading protobuf tools" +cd tmp +curl -sSL \ + https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-$PROTOBUF_PLATFORM.zip \ + --output protobuf.zip +(mkdir -p protobuf && cd protobuf && unzip -q ../protobuf.zip) +cd .. +chmod +x $PROTOC + +echo "- Generating src/ from scratch" + +# First delete any previously-generated files if present +rm -rf src 2>/dev/null +mkdir src + +# Generate using protoc +$PROTOC \ + --java_out=src/ \ + -I tmp/protobuf/include \ + -I tmp/google-cloudevents/third_party/googleapis \ + -I tmp/google-cloudevents/proto \ + $(find tmp/google-cloudevents/proto -name data.proto) + +# Delete temp directory +echo "- Removing tmp/" +rm -rf tmp + +echo "~ DONE ✓" diff --git a/src/google/events/cloud/audit/v1/Data.java b/src/google/events/cloud/audit/v1/Data.java new file mode 100644 index 00000000..59830578 --- /dev/null +++ b/src/google/events/cloud/audit/v1/Data.java @@ -0,0 +1,5982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/audit/v1/data.proto + +package google.events.cloud.audit.v1; + +public final class Data { + private Data() {} + 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 AuditLogDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuditLogData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the API service performing the operation. For example,
+     * `"datastore.googleapis.com"`.
+     * 
+ * + * string service_name = 7; + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + *
+     * The name of the API service performing the operation. For example,
+     * `"datastore.googleapis.com"`.
+     * 
+ * + * string service_name = 7; + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString + getServiceNameBytes(); + + /** + *
+     * The name of the service method or operation.
+     * For API calls, this should be the name of the API method.
+     * For example,
+     *     "google.datastore.v1.Datastore.RunQuery"
+     *     "google.logging.v1.LoggingService.DeleteLog"
+     * 
+ * + * string method_name = 8; + * @return The methodName. + */ + java.lang.String getMethodName(); + /** + *
+     * The name of the service method or operation.
+     * For API calls, this should be the name of the API method.
+     * For example,
+     *     "google.datastore.v1.Datastore.RunQuery"
+     *     "google.logging.v1.LoggingService.DeleteLog"
+     * 
+ * + * string method_name = 8; + * @return The bytes for methodName. + */ + com.google.protobuf.ByteString + getMethodNameBytes(); + + /** + *
+     * The resource or collection that is the target of the operation.
+     * The name is a scheme-less URI, not including the API service name.
+     * For example:
+     *     "shelves/SHELF_ID/books"
+     *     "shelves/SHELF_ID/books/BOOK_ID"
+     * 
+ * + * string resource_name = 11; + * @return The resourceName. + */ + java.lang.String getResourceName(); + /** + *
+     * The resource or collection that is the target of the operation.
+     * The name is a scheme-less URI, not including the API service name.
+     * For example:
+     *     "shelves/SHELF_ID/books"
+     *     "shelves/SHELF_ID/books/BOOK_ID"
+     * 
+ * + * string resource_name = 11; + * @return The bytes for resourceName. + */ + com.google.protobuf.ByteString + getResourceNameBytes(); + + /** + *
+     * The number of items returned from a List or Query API method,
+     * if applicable.
+     * 
+ * + * int64 num_response_items = 12; + * @return The numResponseItems. + */ + long getNumResponseItems(); + + /** + *
+     * The status of the overall operation.
+     * 
+ * + * .google.rpc.Status status = 2; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+     * The status of the overall operation.
+     * 
+ * + * .google.rpc.Status status = 2; + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + *
+     * The status of the overall operation.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + *
+     * Authentication information.
+     * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + * @return Whether the authenticationInfo field is set. + */ + boolean hasAuthenticationInfo(); + /** + *
+     * Authentication information.
+     * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + * @return The authenticationInfo. + */ + google.events.cloud.audit.v1.Data.AuthenticationInfo getAuthenticationInfo(); + /** + *
+     * Authentication information.
+     * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder(); + + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + java.util.List + getAuthorizationInfoList(); + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + google.events.cloud.audit.v1.Data.AuthorizationInfo getAuthorizationInfo(int index); + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + int getAuthorizationInfoCount(); + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + java.util.List + getAuthorizationInfoOrBuilderList(); + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInfoOrBuilder( + int index); + + /** + *
+     * Metadata about the operation.
+     * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + * @return Whether the requestMetadata field is set. + */ + boolean hasRequestMetadata(); + /** + *
+     * Metadata about the operation.
+     * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + * @return The requestMetadata. + */ + google.events.cloud.audit.v1.Data.RequestMetadata getRequestMetadata(); + /** + *
+     * Metadata about the operation.
+     * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder getRequestMetadataOrBuilder(); + + /** + *
+     * The operation request. This may not include all request parameters,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct request = 16; + * @return Whether the request field is set. + */ + boolean hasRequest(); + /** + *
+     * The operation request. This may not include all request parameters,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct request = 16; + * @return The request. + */ + com.google.protobuf.Struct getRequest(); + /** + *
+     * The operation request. This may not include all request parameters,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct request = 16; + */ + com.google.protobuf.StructOrBuilder getRequestOrBuilder(); + + /** + *
+     * The operation response. This may not include all response elements,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct response = 17; + * @return Whether the response field is set. + */ + boolean hasResponse(); + /** + *
+     * The operation response. This may not include all response elements,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct response = 17; + * @return The response. + */ + com.google.protobuf.Struct getResponse(); + /** + *
+     * The operation response. This may not include all response elements,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct response = 17; + */ + com.google.protobuf.StructOrBuilder getResponseOrBuilder(); + + /** + *
+     * Other service-specific data about the request, response, and other
+     * activities.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct service_data = 15; + * @return Whether the serviceData field is set. + */ + boolean hasServiceData(); + /** + *
+     * Other service-specific data about the request, response, and other
+     * activities.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct service_data = 15; + * @return The serviceData. + */ + com.google.protobuf.Struct getServiceData(); + /** + *
+     * Other service-specific data about the request, response, and other
+     * activities.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + com.google.protobuf.StructOrBuilder getServiceDataOrBuilder(); + } + /** + *
+   * Common audit log format for Google Cloud Platform API operations.
+   * Copied from
+   * https://github.com/googleapis/googleapis/blob/master/google/cloud/audit/audit_log.proto,
+   * but changing service_data from Any to Struct.
+   * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuditLogData} + */ + public static final class AuditLogData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuditLogData) + AuditLogDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuditLogData.newBuilder() to construct. + private AuditLogData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuditLogData() { + serviceName_ = ""; + methodName_ = ""; + resourceName_ = ""; + authorizationInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuditLogData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AuditLogData( + 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 18: { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder subBuilder = null; + if (authenticationInfo_ != null) { + subBuilder = authenticationInfo_.toBuilder(); + } + authenticationInfo_ = input.readMessage(google.events.cloud.audit.v1.Data.AuthenticationInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(authenticationInfo_); + authenticationInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + google.events.cloud.audit.v1.Data.RequestMetadata.Builder subBuilder = null; + if (requestMetadata_ != null) { + subBuilder = requestMetadata_.toBuilder(); + } + requestMetadata_ = input.readMessage(google.events.cloud.audit.v1.Data.RequestMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestMetadata_); + requestMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + methodName_ = s; + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + authorizationInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + authorizationInfo_.add( + input.readMessage(google.events.cloud.audit.v1.Data.AuthorizationInfo.parser(), extensionRegistry)); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceName_ = s; + break; + } + case 96: { + + numResponseItems_ = input.readInt64(); + break; + } + case 122: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (serviceData_ != null) { + subBuilder = serviceData_.toBuilder(); + } + serviceData_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serviceData_); + serviceData_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 138: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (response_ != null) { + subBuilder = response_.toBuilder(); + } + response_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(response_); + response_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + authorizationInfo_ = java.util.Collections.unmodifiableList(authorizationInfo_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuditLogData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuditLogData.class, google.events.cloud.audit.v1.Data.AuditLogData.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 7; + private volatile java.lang.Object serviceName_; + /** + *
+     * The name of the API service performing the operation. For example,
+     * `"datastore.googleapis.com"`.
+     * 
+ * + * string service_name = 7; + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + 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(); + serviceName_ = s; + return s; + } + } + /** + *
+     * The name of the API service performing the operation. For example,
+     * `"datastore.googleapis.com"`.
+     * 
+ * + * string service_name = 7; + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHOD_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object methodName_; + /** + *
+     * The name of the service method or operation.
+     * For API calls, this should be the name of the API method.
+     * For example,
+     *     "google.datastore.v1.Datastore.RunQuery"
+     *     "google.logging.v1.LoggingService.DeleteLog"
+     * 
+ * + * string method_name = 8; + * @return The methodName. + */ + @java.lang.Override + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + 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(); + methodName_ = s; + return s; + } + } + /** + *
+     * The name of the service method or operation.
+     * For API calls, this should be the name of the API method.
+     * For example,
+     *     "google.datastore.v1.Datastore.RunQuery"
+     *     "google.logging.v1.LoggingService.DeleteLog"
+     * 
+ * + * string method_name = 8; + * @return The bytes for methodName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_NAME_FIELD_NUMBER = 11; + private volatile java.lang.Object resourceName_; + /** + *
+     * The resource or collection that is the target of the operation.
+     * The name is a scheme-less URI, not including the API service name.
+     * For example:
+     *     "shelves/SHELF_ID/books"
+     *     "shelves/SHELF_ID/books/BOOK_ID"
+     * 
+ * + * string resource_name = 11; + * @return The resourceName. + */ + @java.lang.Override + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + 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(); + resourceName_ = s; + return s; + } + } + /** + *
+     * The resource or collection that is the target of the operation.
+     * The name is a scheme-less URI, not including the API service name.
+     * For example:
+     *     "shelves/SHELF_ID/books"
+     *     "shelves/SHELF_ID/books/BOOK_ID"
+     * 
+ * + * string resource_name = 11; + * @return The bytes for resourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUM_RESPONSE_ITEMS_FIELD_NUMBER = 12; + private long numResponseItems_; + /** + *
+     * The number of items returned from a List or Query API method,
+     * if applicable.
+     * 
+ * + * int64 num_response_items = 12; + * @return The numResponseItems. + */ + @java.lang.Override + public long getNumResponseItems() { + return numResponseItems_; + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + *
+     * The status of the overall operation.
+     * 
+ * + * .google.rpc.Status status = 2; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + *
+     * The status of the overall operation.
+     * 
+ * + * .google.rpc.Status status = 2; + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + *
+     * The status of the overall operation.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int AUTHENTICATION_INFO_FIELD_NUMBER = 3; + private google.events.cloud.audit.v1.Data.AuthenticationInfo authenticationInfo_; + /** + *
+     * Authentication information.
+     * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + * @return Whether the authenticationInfo field is set. + */ + @java.lang.Override + public boolean hasAuthenticationInfo() { + return authenticationInfo_ != null; + } + /** + *
+     * Authentication information.
+     * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + * @return The authenticationInfo. + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo getAuthenticationInfo() { + return authenticationInfo_ == null ? google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + /** + *
+     * Authentication information.
+     * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + return getAuthenticationInfo(); + } + + public static final int AUTHORIZATION_INFO_FIELD_NUMBER = 9; + private java.util.List authorizationInfo_; + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + @java.lang.Override + public java.util.List getAuthorizationInfoList() { + return authorizationInfo_; + } + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + @java.lang.Override + public java.util.List + getAuthorizationInfoOrBuilderList() { + return authorizationInfo_; + } + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + @java.lang.Override + public int getAuthorizationInfoCount() { + return authorizationInfo_.size(); + } + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo getAuthorizationInfo(int index) { + return authorizationInfo_.get(index); + } + /** + *
+     * Authorization information. If there are multiple
+     * resources or permissions involved, then there is
+     * one AuthorizationInfo element for each {resource, permission} tuple.
+     * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInfoOrBuilder( + int index) { + return authorizationInfo_.get(index); + } + + public static final int REQUEST_METADATA_FIELD_NUMBER = 4; + private google.events.cloud.audit.v1.Data.RequestMetadata requestMetadata_; + /** + *
+     * Metadata about the operation.
+     * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + * @return Whether the requestMetadata field is set. + */ + @java.lang.Override + public boolean hasRequestMetadata() { + return requestMetadata_ != null; + } + /** + *
+     * Metadata about the operation.
+     * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + * @return The requestMetadata. + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata getRequestMetadata() { + return requestMetadata_ == null ? google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; + } + /** + *
+     * Metadata about the operation.
+     * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder getRequestMetadataOrBuilder() { + return getRequestMetadata(); + } + + public static final int REQUEST_FIELD_NUMBER = 16; + private com.google.protobuf.Struct request_; + /** + *
+     * The operation request. This may not include all request parameters,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct request = 16; + * @return Whether the request field is set. + */ + @java.lang.Override + public boolean hasRequest() { + return request_ != null; + } + /** + *
+     * The operation request. This may not include all request parameters,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct request = 16; + * @return The request. + */ + @java.lang.Override + public com.google.protobuf.Struct getRequest() { + return request_ == null ? com.google.protobuf.Struct.getDefaultInstance() : request_; + } + /** + *
+     * The operation request. This may not include all request parameters,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct request = 16; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + public static final int RESPONSE_FIELD_NUMBER = 17; + private com.google.protobuf.Struct response_; + /** + *
+     * The operation response. This may not include all response elements,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct response = 17; + * @return Whether the response field is set. + */ + @java.lang.Override + public boolean hasResponse() { + return response_ != null; + } + /** + *
+     * The operation response. This may not include all response elements,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct response = 17; + * @return The response. + */ + @java.lang.Override + public com.google.protobuf.Struct getResponse() { + return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; + } + /** + *
+     * The operation response. This may not include all response elements,
+     * such as those that are too large, privacy-sensitive, or duplicated
+     * elsewhere in the log record.
+     * It should never include user-generated data, such as file contents.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct response = 17; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { + return getResponse(); + } + + public static final int SERVICE_DATA_FIELD_NUMBER = 15; + private com.google.protobuf.Struct serviceData_; + /** + *
+     * Other service-specific data about the request, response, and other
+     * activities.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct service_data = 15; + * @return Whether the serviceData field is set. + */ + @java.lang.Override + public boolean hasServiceData() { + return serviceData_ != null; + } + /** + *
+     * Other service-specific data about the request, response, and other
+     * activities.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct service_data = 15; + * @return The serviceData. + */ + @java.lang.Override + public com.google.protobuf.Struct getServiceData() { + return serviceData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + } + /** + *
+     * Other service-specific data about the request, response, and other
+     * activities.
+     * When the JSON object represented here has a proto equivalent, the proto
+     * name will be indicated in the `@type` property.
+     * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getServiceDataOrBuilder() { + return getServiceData(); + } + + 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 (status_ != null) { + output.writeMessage(2, getStatus()); + } + if (authenticationInfo_ != null) { + output.writeMessage(3, getAuthenticationInfo()); + } + if (requestMetadata_ != null) { + output.writeMessage(4, getRequestMetadata()); + } + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceName_); + } + if (!getMethodNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, methodName_); + } + for (int i = 0; i < authorizationInfo_.size(); i++) { + output.writeMessage(9, authorizationInfo_.get(i)); + } + if (!getResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, resourceName_); + } + if (numResponseItems_ != 0L) { + output.writeInt64(12, numResponseItems_); + } + if (serviceData_ != null) { + output.writeMessage(15, getServiceData()); + } + if (request_ != null) { + output.writeMessage(16, getRequest()); + } + if (response_ != null) { + output.writeMessage(17, getResponse()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getStatus()); + } + if (authenticationInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAuthenticationInfo()); + } + if (requestMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getRequestMetadata()); + } + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceName_); + } + if (!getMethodNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, methodName_); + } + for (int i = 0; i < authorizationInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, authorizationInfo_.get(i)); + } + if (!getResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, resourceName_); + } + if (numResponseItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, numResponseItems_); + } + if (serviceData_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getServiceData()); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getRequest()); + } + if (response_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getResponse()); + } + 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 google.events.cloud.audit.v1.Data.AuditLogData)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.AuditLogData other = (google.events.cloud.audit.v1.Data.AuditLogData) obj; + + if (!getServiceName() + .equals(other.getServiceName())) return false; + if (!getMethodName() + .equals(other.getMethodName())) return false; + if (!getResourceName() + .equals(other.getResourceName())) return false; + if (getNumResponseItems() + != other.getNumResponseItems()) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (hasAuthenticationInfo() != other.hasAuthenticationInfo()) return false; + if (hasAuthenticationInfo()) { + if (!getAuthenticationInfo() + .equals(other.getAuthenticationInfo())) return false; + } + if (!getAuthorizationInfoList() + .equals(other.getAuthorizationInfoList())) return false; + if (hasRequestMetadata() != other.hasRequestMetadata()) return false; + if (hasRequestMetadata()) { + if (!getRequestMetadata() + .equals(other.getRequestMetadata())) return false; + } + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest() + .equals(other.getRequest())) return false; + } + if (hasResponse() != other.hasResponse()) return false; + if (hasResponse()) { + if (!getResponse() + .equals(other.getResponse())) return false; + } + if (hasServiceData() != other.hasServiceData()) return false; + if (hasServiceData()) { + if (!getServiceData() + .equals(other.getServiceData())) 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) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMethodName().hashCode(); + hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getResourceName().hashCode(); + hash = (37 * hash) + NUM_RESPONSE_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumResponseItems()); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasAuthenticationInfo()) { + hash = (37 * hash) + AUTHENTICATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthenticationInfo().hashCode(); + } + if (getAuthorizationInfoCount() > 0) { + hash = (37 * hash) + AUTHORIZATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationInfoList().hashCode(); + } + if (hasRequestMetadata()) { + hash = (37 * hash) + REQUEST_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getRequestMetadata().hashCode(); + } + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + if (hasResponse()) { + hash = (37 * hash) + RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getResponse().hashCode(); + } + if (hasServiceData()) { + hash = (37 * hash) + SERVICE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getServiceData().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuditLogData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuditLogData 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 google.events.cloud.audit.v1.Data.AuditLogData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuditLogData 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 google.events.cloud.audit.v1.Data.AuditLogData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuditLogData 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(google.events.cloud.audit.v1.Data.AuditLogData 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; + } + /** + *
+     * Common audit log format for Google Cloud Platform API operations.
+     * Copied from
+     * https://github.com/googleapis/googleapis/blob/master/google/cloud/audit/audit_log.proto,
+     * but changing service_data from Any to Struct.
+     * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuditLogData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuditLogData) + google.events.cloud.audit.v1.Data.AuditLogDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuditLogData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuditLogData.class, google.events.cloud.audit.v1.Data.AuditLogData.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.AuditLogData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAuthorizationInfoFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + methodName_ = ""; + + resourceName_ = ""; + + numResponseItems_ = 0L; + + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = null; + } else { + authenticationInfo_ = null; + authenticationInfoBuilder_ = null; + } + if (authorizationInfoBuilder_ == null) { + authorizationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + authorizationInfoBuilder_.clear(); + } + if (requestMetadataBuilder_ == null) { + requestMetadata_ = null; + } else { + requestMetadata_ = null; + requestMetadataBuilder_ = null; + } + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + if (responseBuilder_ == null) { + response_ = null; + } else { + response_ = null; + responseBuilder_ = null; + } + if (serviceDataBuilder_ == null) { + serviceData_ = null; + } else { + serviceData_ = null; + serviceDataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.AuditLogData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuditLogData build() { + google.events.cloud.audit.v1.Data.AuditLogData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuditLogData buildPartial() { + google.events.cloud.audit.v1.Data.AuditLogData result = new google.events.cloud.audit.v1.Data.AuditLogData(this); + int from_bitField0_ = bitField0_; + result.serviceName_ = serviceName_; + result.methodName_ = methodName_; + result.resourceName_ = resourceName_; + result.numResponseItems_ = numResponseItems_; + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (authenticationInfoBuilder_ == null) { + result.authenticationInfo_ = authenticationInfo_; + } else { + result.authenticationInfo_ = authenticationInfoBuilder_.build(); + } + if (authorizationInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + authorizationInfo_ = java.util.Collections.unmodifiableList(authorizationInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.authorizationInfo_ = authorizationInfo_; + } else { + result.authorizationInfo_ = authorizationInfoBuilder_.build(); + } + if (requestMetadataBuilder_ == null) { + result.requestMetadata_ = requestMetadata_; + } else { + result.requestMetadata_ = requestMetadataBuilder_.build(); + } + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + if (responseBuilder_ == null) { + result.response_ = response_; + } else { + result.response_ = responseBuilder_.build(); + } + if (serviceDataBuilder_ == null) { + result.serviceData_ = serviceData_; + } else { + result.serviceData_ = serviceDataBuilder_.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 google.events.cloud.audit.v1.Data.AuditLogData) { + return mergeFrom((google.events.cloud.audit.v1.Data.AuditLogData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuditLogData other) { + if (other == google.events.cloud.audit.v1.Data.AuditLogData.getDefaultInstance()) return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getMethodName().isEmpty()) { + methodName_ = other.methodName_; + onChanged(); + } + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + onChanged(); + } + if (other.getNumResponseItems() != 0L) { + setNumResponseItems(other.getNumResponseItems()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasAuthenticationInfo()) { + mergeAuthenticationInfo(other.getAuthenticationInfo()); + } + if (authorizationInfoBuilder_ == null) { + if (!other.authorizationInfo_.isEmpty()) { + if (authorizationInfo_.isEmpty()) { + authorizationInfo_ = other.authorizationInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.addAll(other.authorizationInfo_); + } + onChanged(); + } + } else { + if (!other.authorizationInfo_.isEmpty()) { + if (authorizationInfoBuilder_.isEmpty()) { + authorizationInfoBuilder_.dispose(); + authorizationInfoBuilder_ = null; + authorizationInfo_ = other.authorizationInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + authorizationInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAuthorizationInfoFieldBuilder() : null; + } else { + authorizationInfoBuilder_.addAllMessages(other.authorizationInfo_); + } + } + } + if (other.hasRequestMetadata()) { + mergeRequestMetadata(other.getRequestMetadata()); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.hasResponse()) { + mergeResponse(other.getResponse()); + } + if (other.hasServiceData()) { + mergeServiceData(other.getServiceData()); + } + 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 { + google.events.cloud.audit.v1.Data.AuditLogData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.AuditLogData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object serviceName_ = ""; + /** + *
+       * The name of the API service performing the operation. For example,
+       * `"datastore.googleapis.com"`.
+       * 
+ * + * string service_name = 7; + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the API service performing the operation. For example,
+       * `"datastore.googleapis.com"`.
+       * 
+ * + * string service_name = 7; + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString + getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the API service performing the operation. For example,
+       * `"datastore.googleapis.com"`.
+       * 
+ * + * string service_name = 7; + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the API service performing the operation. For example,
+       * `"datastore.googleapis.com"`.
+       * 
+ * + * string service_name = 7; + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + *
+       * The name of the API service performing the operation. For example,
+       * `"datastore.googleapis.com"`.
+       * 
+ * + * string service_name = 7; + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object methodName_ = ""; + /** + *
+       * The name of the service method or operation.
+       * For API calls, this should be the name of the API method.
+       * For example,
+       *     "google.datastore.v1.Datastore.RunQuery"
+       *     "google.logging.v1.LoggingService.DeleteLog"
+       * 
+ * + * string method_name = 8; + * @return The methodName. + */ + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + methodName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the service method or operation.
+       * For API calls, this should be the name of the API method.
+       * For example,
+       *     "google.datastore.v1.Datastore.RunQuery"
+       *     "google.logging.v1.LoggingService.DeleteLog"
+       * 
+ * + * string method_name = 8; + * @return The bytes for methodName. + */ + public com.google.protobuf.ByteString + getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the service method or operation.
+       * For API calls, this should be the name of the API method.
+       * For example,
+       *     "google.datastore.v1.Datastore.RunQuery"
+       *     "google.logging.v1.LoggingService.DeleteLog"
+       * 
+ * + * string method_name = 8; + * @param value The methodName to set. + * @return This builder for chaining. + */ + public Builder setMethodName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + methodName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the service method or operation.
+       * For API calls, this should be the name of the API method.
+       * For example,
+       *     "google.datastore.v1.Datastore.RunQuery"
+       *     "google.logging.v1.LoggingService.DeleteLog"
+       * 
+ * + * string method_name = 8; + * @return This builder for chaining. + */ + public Builder clearMethodName() { + + methodName_ = getDefaultInstance().getMethodName(); + onChanged(); + return this; + } + /** + *
+       * The name of the service method or operation.
+       * For API calls, this should be the name of the API method.
+       * For example,
+       *     "google.datastore.v1.Datastore.RunQuery"
+       *     "google.logging.v1.LoggingService.DeleteLog"
+       * 
+ * + * string method_name = 8; + * @param value The bytes for methodName to set. + * @return This builder for chaining. + */ + public Builder setMethodNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + methodName_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceName_ = ""; + /** + *
+       * The resource or collection that is the target of the operation.
+       * The name is a scheme-less URI, not including the API service name.
+       * For example:
+       *     "shelves/SHELF_ID/books"
+       *     "shelves/SHELF_ID/books/BOOK_ID"
+       * 
+ * + * string resource_name = 11; + * @return The resourceName. + */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource or collection that is the target of the operation.
+       * The name is a scheme-less URI, not including the API service name.
+       * For example:
+       *     "shelves/SHELF_ID/books"
+       *     "shelves/SHELF_ID/books/BOOK_ID"
+       * 
+ * + * string resource_name = 11; + * @return The bytes for resourceName. + */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource or collection that is the target of the operation.
+       * The name is a scheme-less URI, not including the API service name.
+       * For example:
+       *     "shelves/SHELF_ID/books"
+       *     "shelves/SHELF_ID/books/BOOK_ID"
+       * 
+ * + * string resource_name = 11; + * @param value The resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceName_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource or collection that is the target of the operation.
+       * The name is a scheme-less URI, not including the API service name.
+       * For example:
+       *     "shelves/SHELF_ID/books"
+       *     "shelves/SHELF_ID/books/BOOK_ID"
+       * 
+ * + * string resource_name = 11; + * @return This builder for chaining. + */ + public Builder clearResourceName() { + + resourceName_ = getDefaultInstance().getResourceName(); + onChanged(); + return this; + } + /** + *
+       * The resource or collection that is the target of the operation.
+       * The name is a scheme-less URI, not including the API service name.
+       * For example:
+       *     "shelves/SHELF_ID/books"
+       *     "shelves/SHELF_ID/books/BOOK_ID"
+       * 
+ * + * string resource_name = 11; + * @param value The bytes for resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceName_ = value; + onChanged(); + return this; + } + + private long numResponseItems_ ; + /** + *
+       * The number of items returned from a List or Query API method,
+       * if applicable.
+       * 
+ * + * int64 num_response_items = 12; + * @return The numResponseItems. + */ + @java.lang.Override + public long getNumResponseItems() { + return numResponseItems_; + } + /** + *
+       * The number of items returned from a List or Query API method,
+       * if applicable.
+       * 
+ * + * int64 num_response_items = 12; + * @param value The numResponseItems to set. + * @return This builder for chaining. + */ + public Builder setNumResponseItems(long value) { + + numResponseItems_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of items returned from a List or Query API method,
+       * if applicable.
+       * 
+ * + * int64 num_response_items = 12; + * @return This builder for chaining. + */ + public Builder clearNumResponseItems() { + + numResponseItems_ = 0L; + onChanged(); + return this; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus( + com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + *
+       * The status of the overall operation.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + private google.events.cloud.audit.v1.Data.AuthenticationInfo authenticationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder> authenticationInfoBuilder_; + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + * @return Whether the authenticationInfo field is set. + */ + public boolean hasAuthenticationInfo() { + return authenticationInfoBuilder_ != null || authenticationInfo_ != null; + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + * @return The authenticationInfo. + */ + public google.events.cloud.audit.v1.Data.AuthenticationInfo getAuthenticationInfo() { + if (authenticationInfoBuilder_ == null) { + return authenticationInfo_ == null ? google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } else { + return authenticationInfoBuilder_.getMessage(); + } + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + public Builder setAuthenticationInfo(google.events.cloud.audit.v1.Data.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authenticationInfo_ = value; + onChanged(); + } else { + authenticationInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + public Builder setAuthenticationInfo( + google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder builderForValue) { + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = builderForValue.build(); + onChanged(); + } else { + authenticationInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + public Builder mergeAuthenticationInfo(google.events.cloud.audit.v1.Data.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (authenticationInfo_ != null) { + authenticationInfo_ = + google.events.cloud.audit.v1.Data.AuthenticationInfo.newBuilder(authenticationInfo_).mergeFrom(value).buildPartial(); + } else { + authenticationInfo_ = value; + } + onChanged(); + } else { + authenticationInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + public Builder clearAuthenticationInfo() { + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = null; + onChanged(); + } else { + authenticationInfo_ = null; + authenticationInfoBuilder_ = null; + } + + return this; + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + public google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder getAuthenticationInfoBuilder() { + + onChanged(); + return getAuthenticationInfoFieldBuilder().getBuilder(); + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + public google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + if (authenticationInfoBuilder_ != null) { + return authenticationInfoBuilder_.getMessageOrBuilder(); + } else { + return authenticationInfo_ == null ? + google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + } + /** + *
+       * Authentication information.
+       * 
+ * + * .google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder> + getAuthenticationInfoFieldBuilder() { + if (authenticationInfoBuilder_ == null) { + authenticationInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder>( + getAuthenticationInfo(), + getParentForChildren(), + isClean()); + authenticationInfo_ = null; + } + return authenticationInfoBuilder_; + } + + private java.util.List authorizationInfo_ = + java.util.Collections.emptyList(); + private void ensureAuthorizationInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + authorizationInfo_ = new java.util.ArrayList(authorizationInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> authorizationInfoBuilder_; + + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public java.util.List getAuthorizationInfoList() { + if (authorizationInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(authorizationInfo_); + } else { + return authorizationInfoBuilder_.getMessageList(); + } + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public int getAuthorizationInfoCount() { + if (authorizationInfoBuilder_ == null) { + return authorizationInfo_.size(); + } else { + return authorizationInfoBuilder_.getCount(); + } + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public google.events.cloud.audit.v1.Data.AuthorizationInfo getAuthorizationInfo(int index) { + if (authorizationInfoBuilder_ == null) { + return authorizationInfo_.get(index); + } else { + return authorizationInfoBuilder_.getMessage(index); + } + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder setAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo value) { + if (authorizationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.set(index, value); + onChanged(); + } else { + authorizationInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder setAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + authorizationInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder addAuthorizationInfo(google.events.cloud.audit.v1.Data.AuthorizationInfo value) { + if (authorizationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(value); + onChanged(); + } else { + authorizationInfoBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder addAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo value) { + if (authorizationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(index, value); + onChanged(); + } else { + authorizationInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder addAuthorizationInfo( + google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(builderForValue.build()); + onChanged(); + } else { + authorizationInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder addAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + authorizationInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder addAllAuthorizationInfo( + java.lang.Iterable values) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, authorizationInfo_); + onChanged(); + } else { + authorizationInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder clearAuthorizationInfo() { + if (authorizationInfoBuilder_ == null) { + authorizationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + authorizationInfoBuilder_.clear(); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public Builder removeAuthorizationInfo(int index) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.remove(index); + onChanged(); + } else { + authorizationInfoBuilder_.remove(index); + } + return this; + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder getAuthorizationInfoBuilder( + int index) { + return getAuthorizationInfoFieldBuilder().getBuilder(index); + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInfoOrBuilder( + int index) { + if (authorizationInfoBuilder_ == null) { + return authorizationInfo_.get(index); } else { + return authorizationInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public java.util.List + getAuthorizationInfoOrBuilderList() { + if (authorizationInfoBuilder_ != null) { + return authorizationInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(authorizationInfo_); + } + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder addAuthorizationInfoBuilder() { + return getAuthorizationInfoFieldBuilder().addBuilder( + google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()); + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder addAuthorizationInfoBuilder( + int index) { + return getAuthorizationInfoFieldBuilder().addBuilder( + index, google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()); + } + /** + *
+       * Authorization information. If there are multiple
+       * resources or permissions involved, then there is
+       * one AuthorizationInfo element for each {resource, permission} tuple.
+       * 
+ * + * repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9; + */ + public java.util.List + getAuthorizationInfoBuilderList() { + return getAuthorizationInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> + getAuthorizationInfoFieldBuilder() { + if (authorizationInfoBuilder_ == null) { + authorizationInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder>( + authorizationInfo_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + authorizationInfo_ = null; + } + return authorizationInfoBuilder_; + } + + private google.events.cloud.audit.v1.Data.RequestMetadata requestMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder> requestMetadataBuilder_; + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + * @return Whether the requestMetadata field is set. + */ + public boolean hasRequestMetadata() { + return requestMetadataBuilder_ != null || requestMetadata_ != null; + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + * @return The requestMetadata. + */ + public google.events.cloud.audit.v1.Data.RequestMetadata getRequestMetadata() { + if (requestMetadataBuilder_ == null) { + return requestMetadata_ == null ? google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; + } else { + return requestMetadataBuilder_.getMessage(); + } + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + public Builder setRequestMetadata(google.events.cloud.audit.v1.Data.RequestMetadata value) { + if (requestMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestMetadata_ = value; + onChanged(); + } else { + requestMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + public Builder setRequestMetadata( + google.events.cloud.audit.v1.Data.RequestMetadata.Builder builderForValue) { + if (requestMetadataBuilder_ == null) { + requestMetadata_ = builderForValue.build(); + onChanged(); + } else { + requestMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + public Builder mergeRequestMetadata(google.events.cloud.audit.v1.Data.RequestMetadata value) { + if (requestMetadataBuilder_ == null) { + if (requestMetadata_ != null) { + requestMetadata_ = + google.events.cloud.audit.v1.Data.RequestMetadata.newBuilder(requestMetadata_).mergeFrom(value).buildPartial(); + } else { + requestMetadata_ = value; + } + onChanged(); + } else { + requestMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + public Builder clearRequestMetadata() { + if (requestMetadataBuilder_ == null) { + requestMetadata_ = null; + onChanged(); + } else { + requestMetadata_ = null; + requestMetadataBuilder_ = null; + } + + return this; + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + public google.events.cloud.audit.v1.Data.RequestMetadata.Builder getRequestMetadataBuilder() { + + onChanged(); + return getRequestMetadataFieldBuilder().getBuilder(); + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + public google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder getRequestMetadataOrBuilder() { + if (requestMetadataBuilder_ != null) { + return requestMetadataBuilder_.getMessageOrBuilder(); + } else { + return requestMetadata_ == null ? + google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; + } + } + /** + *
+       * Metadata about the operation.
+       * 
+ * + * .google.events.cloud.audit.v1.RequestMetadata request_metadata = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder> + getRequestMetadataFieldBuilder() { + if (requestMetadataBuilder_ == null) { + requestMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder>( + getRequestMetadata(), + getParentForChildren(), + isClean()); + requestMetadata_ = null; + } + return requestMetadataBuilder_; + } + + private com.google.protobuf.Struct request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> requestBuilder_; + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + * @return Whether the request field is set. + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + * @return The request. + */ + public com.google.protobuf.Struct getRequest() { + if (requestBuilder_ == null) { + return request_ == null ? com.google.protobuf.Struct.getDefaultInstance() : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + public Builder setRequest(com.google.protobuf.Struct value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + public Builder setRequest( + com.google.protobuf.Struct.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + public Builder mergeRequest(com.google.protobuf.Struct value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.protobuf.Struct.newBuilder(request_).mergeFrom(value).buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + public com.google.protobuf.Struct.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + public com.google.protobuf.StructOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : request_; + } + } + /** + *
+       * The operation request. This may not include all request parameters,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct request = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getRequest(), + getParentForChildren(), + isClean()); + request_ = null; + } + return requestBuilder_; + } + + private com.google.protobuf.Struct response_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> responseBuilder_; + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + * @return Whether the response field is set. + */ + public boolean hasResponse() { + return responseBuilder_ != null || response_ != null; + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + * @return The response. + */ + public com.google.protobuf.Struct getResponse() { + if (responseBuilder_ == null) { + return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; + } else { + return responseBuilder_.getMessage(); + } + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + public Builder setResponse(com.google.protobuf.Struct value) { + if (responseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + responseBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + public Builder setResponse( + com.google.protobuf.Struct.Builder builderForValue) { + if (responseBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + responseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + public Builder mergeResponse(com.google.protobuf.Struct value) { + if (responseBuilder_ == null) { + if (response_ != null) { + response_ = + com.google.protobuf.Struct.newBuilder(response_).mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + responseBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + public Builder clearResponse() { + if (responseBuilder_ == null) { + response_ = null; + onChanged(); + } else { + response_ = null; + responseBuilder_ = null; + } + + return this; + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + public com.google.protobuf.Struct.Builder getResponseBuilder() { + + onChanged(); + return getResponseFieldBuilder().getBuilder(); + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { + if (responseBuilder_ != null) { + return responseBuilder_.getMessageOrBuilder(); + } else { + return response_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : response_; + } + } + /** + *
+       * The operation response. This may not include all response elements,
+       * such as those that are too large, privacy-sensitive, or duplicated
+       * elsewhere in the log record.
+       * It should never include user-generated data, such as file contents.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct response = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getResponseFieldBuilder() { + if (responseBuilder_ == null) { + responseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getResponse(), + getParentForChildren(), + isClean()); + response_ = null; + } + return responseBuilder_; + } + + private com.google.protobuf.Struct serviceData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> serviceDataBuilder_; + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + * @return Whether the serviceData field is set. + */ + public boolean hasServiceData() { + return serviceDataBuilder_ != null || serviceData_ != null; + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + * @return The serviceData. + */ + public com.google.protobuf.Struct getServiceData() { + if (serviceDataBuilder_ == null) { + return serviceData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + } else { + return serviceDataBuilder_.getMessage(); + } + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + public Builder setServiceData(com.google.protobuf.Struct value) { + if (serviceDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceData_ = value; + onChanged(); + } else { + serviceDataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + public Builder setServiceData( + com.google.protobuf.Struct.Builder builderForValue) { + if (serviceDataBuilder_ == null) { + serviceData_ = builderForValue.build(); + onChanged(); + } else { + serviceDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + public Builder mergeServiceData(com.google.protobuf.Struct value) { + if (serviceDataBuilder_ == null) { + if (serviceData_ != null) { + serviceData_ = + com.google.protobuf.Struct.newBuilder(serviceData_).mergeFrom(value).buildPartial(); + } else { + serviceData_ = value; + } + onChanged(); + } else { + serviceDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + public Builder clearServiceData() { + if (serviceDataBuilder_ == null) { + serviceData_ = null; + onChanged(); + } else { + serviceData_ = null; + serviceDataBuilder_ = null; + } + + return this; + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + public com.google.protobuf.Struct.Builder getServiceDataBuilder() { + + onChanged(); + return getServiceDataFieldBuilder().getBuilder(); + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + public com.google.protobuf.StructOrBuilder getServiceDataOrBuilder() { + if (serviceDataBuilder_ != null) { + return serviceDataBuilder_.getMessageOrBuilder(); + } else { + return serviceData_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + } + } + /** + *
+       * Other service-specific data about the request, response, and other
+       * activities.
+       * When the JSON object represented here has a proto equivalent, the proto
+       * name will be indicated in the `@type` property.
+       * 
+ * + * .google.protobuf.Struct service_data = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getServiceDataFieldBuilder() { + if (serviceDataBuilder_ == null) { + serviceDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getServiceData(), + getParentForChildren(), + isClean()); + serviceData_ = null; + } + return serviceDataBuilder_; + } + @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:google.events.cloud.audit.v1.AuditLogData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuditLogData) + private static final google.events.cloud.audit.v1.Data.AuditLogData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuditLogData(); + } + + public static google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditLogData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuditLogData(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 google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthenticationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuthenticationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The email address of the authenticated user making the request.
+     * 
+ * + * string principal_email = 1; + * @return The principalEmail. + */ + java.lang.String getPrincipalEmail(); + /** + *
+     * The email address of the authenticated user making the request.
+     * 
+ * + * string principal_email = 1; + * @return The bytes for principalEmail. + */ + com.google.protobuf.ByteString + getPrincipalEmailBytes(); + } + /** + *
+   * Authentication information for the operation.
+   * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthenticationInfo} + */ + public static final class AuthenticationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuthenticationInfo) + AuthenticationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthenticationInfo.newBuilder() to construct. + private AuthenticationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuthenticationInfo() { + principalEmail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthenticationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AuthenticationInfo( + 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(); + + principalEmail_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthenticationInfo.class, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder.class); + } + + public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object principalEmail_; + /** + *
+     * The email address of the authenticated user making the request.
+     * 
+ * + * string principal_email = 1; + * @return The principalEmail. + */ + @java.lang.Override + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + 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(); + principalEmail_ = s; + return s; + } + } + /** + *
+     * The email address of the authenticated user making the request.
+     * 
+ * + * string principal_email = 1; + * @return The bytes for principalEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalEmail_ = 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 (!getPrincipalEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPrincipalEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); + } + 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 google.events.cloud.audit.v1.Data.AuthenticationInfo)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.AuthenticationInfo other = (google.events.cloud.audit.v1.Data.AuthenticationInfo) obj; + + if (!getPrincipalEmail() + .equals(other.getPrincipalEmail())) 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) + PRINCIPAL_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalEmail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo 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 google.events.cloud.audit.v1.Data.AuthenticationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo 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 google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo 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(google.events.cloud.audit.v1.Data.AuthenticationInfo 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; + } + /** + *
+     * Authentication information for the operation.
+     * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthenticationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuthenticationInfo) + google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthenticationInfo.class, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.AuthenticationInfo.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(); + principalEmail_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo build() { + google.events.cloud.audit.v1.Data.AuthenticationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo buildPartial() { + google.events.cloud.audit.v1.Data.AuthenticationInfo result = new google.events.cloud.audit.v1.Data.AuthenticationInfo(this); + result.principalEmail_ = principalEmail_; + 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 google.events.cloud.audit.v1.Data.AuthenticationInfo) { + return mergeFrom((google.events.cloud.audit.v1.Data.AuthenticationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuthenticationInfo other) { + if (other == google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance()) return this; + if (!other.getPrincipalEmail().isEmpty()) { + principalEmail_ = other.principalEmail_; + 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 { + google.events.cloud.audit.v1.Data.AuthenticationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.AuthenticationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object principalEmail_ = ""; + /** + *
+       * The email address of the authenticated user making the request.
+       * 
+ * + * string principal_email = 1; + * @return The principalEmail. + */ + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The email address of the authenticated user making the request.
+       * 
+ * + * string principal_email = 1; + * @return The bytes for principalEmail. + */ + public com.google.protobuf.ByteString + getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The email address of the authenticated user making the request.
+       * 
+ * + * string principal_email = 1; + * @param value The principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + principalEmail_ = value; + onChanged(); + return this; + } + /** + *
+       * The email address of the authenticated user making the request.
+       * 
+ * + * string principal_email = 1; + * @return This builder for chaining. + */ + public Builder clearPrincipalEmail() { + + principalEmail_ = getDefaultInstance().getPrincipalEmail(); + onChanged(); + return this; + } + /** + *
+       * The email address of the authenticated user making the request.
+       * 
+ * + * string principal_email = 1; + * @param value The bytes for principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + principalEmail_ = 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:google.events.cloud.audit.v1.AuthenticationInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuthenticationInfo) + private static final google.events.cloud.audit.v1.Data.AuthenticationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuthenticationInfo(); + } + + public static google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthenticationInfo(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 google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthorizationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuthorizationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The resource being accessed, as a REST-style string. For example:
+     *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+     * 
+ * + * string resource = 1; + * @return The resource. + */ + java.lang.String getResource(); + /** + *
+     * The resource being accessed, as a REST-style string. For example:
+     *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+     * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *
+     * The required IAM permission.
+     * 
+ * + * string permission = 2; + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+     * The required IAM permission.
+     * 
+ * + * string permission = 2; + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+     * Whether or not authorization for `resource` and `permission`
+     * was granted.
+     * 
+ * + * bool granted = 3; + * @return The granted. + */ + boolean getGranted(); + } + /** + *
+   * Authorization information for the operation.
+   * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthorizationInfo} + */ + public static final class AuthorizationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuthorizationInfo) + AuthorizationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorizationInfo.newBuilder() to construct. + private AuthorizationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuthorizationInfo() { + resource_ = ""; + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthorizationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AuthorizationInfo( + 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(); + + resource_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + permission_ = s; + break; + } + case 24: { + + granted_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthorizationInfo.class, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + *
+     * The resource being accessed, as a REST-style string. For example:
+     *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+     * 
+ * + * string resource = 1; + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + /** + *
+     * The resource being accessed, as a REST-style string. For example:
+     *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+     * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + private volatile java.lang.Object permission_; + /** + *
+     * The required IAM permission.
+     * 
+ * + * string permission = 2; + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+     * The required IAM permission.
+     * 
+ * + * string permission = 2; + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRANTED_FIELD_NUMBER = 3; + private boolean granted_; + /** + *
+     * Whether or not authorization for `resource` and `permission`
+     * was granted.
+     * 
+ * + * bool granted = 3; + * @return The granted. + */ + @java.lang.Override + public boolean getGranted() { + return granted_; + } + + 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 (!getResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (!getPermissionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (granted_ != false) { + output.writeBool(3, granted_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (!getPermissionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (granted_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, granted_); + } + 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 google.events.cloud.audit.v1.Data.AuthorizationInfo)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.AuthorizationInfo other = (google.events.cloud.audit.v1.Data.AuthorizationInfo) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (!getPermission() + .equals(other.getPermission())) return false; + if (getGranted() + != other.getGranted()) 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) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (37 * hash) + GRANTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getGranted()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo 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 google.events.cloud.audit.v1.Data.AuthorizationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo 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 google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo 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(google.events.cloud.audit.v1.Data.AuthorizationInfo 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; + } + /** + *
+     * Authorization information for the operation.
+     * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthorizationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuthorizationInfo) + google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthorizationInfo.class, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.AuthorizationInfo.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(); + resource_ = ""; + + permission_ = ""; + + granted_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo build() { + google.events.cloud.audit.v1.Data.AuthorizationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo buildPartial() { + google.events.cloud.audit.v1.Data.AuthorizationInfo result = new google.events.cloud.audit.v1.Data.AuthorizationInfo(this); + result.resource_ = resource_; + result.permission_ = permission_; + result.granted_ = granted_; + 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 google.events.cloud.audit.v1.Data.AuthorizationInfo) { + return mergeFrom((google.events.cloud.audit.v1.Data.AuthorizationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuthorizationInfo other) { + if (other == google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + onChanged(); + } + if (other.getGranted() != false) { + setGranted(other.getGranted()); + } + 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 { + google.events.cloud.audit.v1.Data.AuthorizationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.AuthorizationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resource_ = ""; + /** + *
+       * The resource being accessed, as a REST-style string. For example:
+       *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+       * 
+ * + * string resource = 1; + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource being accessed, as a REST-style string. For example:
+       *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+       * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource being accessed, as a REST-style string. For example:
+       *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+       * 
+ * + * string resource = 1; + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource being accessed, as a REST-style string. For example:
+       *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+       * 
+ * + * string resource = 1; + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + *
+       * The resource being accessed, as a REST-style string. For example:
+       *     bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
+       * 
+ * + * string resource = 1; + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object permission_ = ""; + /** + *
+       * The required IAM permission.
+       * 
+ * + * string permission = 2; + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The required IAM permission.
+       * 
+ * + * string permission = 2; + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The required IAM permission.
+       * 
+ * + * string permission = 2; + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + permission_ = value; + onChanged(); + return this; + } + /** + *
+       * The required IAM permission.
+       * 
+ * + * string permission = 2; + * @return This builder for chaining. + */ + public Builder clearPermission() { + + permission_ = getDefaultInstance().getPermission(); + onChanged(); + return this; + } + /** + *
+       * The required IAM permission.
+       * 
+ * + * string permission = 2; + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + permission_ = value; + onChanged(); + return this; + } + + private boolean granted_ ; + /** + *
+       * Whether or not authorization for `resource` and `permission`
+       * was granted.
+       * 
+ * + * bool granted = 3; + * @return The granted. + */ + @java.lang.Override + public boolean getGranted() { + return granted_; + } + /** + *
+       * Whether or not authorization for `resource` and `permission`
+       * was granted.
+       * 
+ * + * bool granted = 3; + * @param value The granted to set. + * @return This builder for chaining. + */ + public Builder setGranted(boolean value) { + + granted_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether or not authorization for `resource` and `permission`
+       * was granted.
+       * 
+ * + * bool granted = 3; + * @return This builder for chaining. + */ + public Builder clearGranted() { + + granted_ = 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:google.events.cloud.audit.v1.AuthorizationInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuthorizationInfo) + private static final google.events.cloud.audit.v1.Data.AuthorizationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuthorizationInfo(); + } + + public static google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthorizationInfo(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 google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RequestMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.RequestMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The IP address of the caller.
+     * 
+ * + * string caller_ip = 1; + * @return The callerIp. + */ + java.lang.String getCallerIp(); + /** + *
+     * The IP address of the caller.
+     * 
+ * + * string caller_ip = 1; + * @return The bytes for callerIp. + */ + com.google.protobuf.ByteString + getCallerIpBytes(); + + /** + *
+     * The user agent of the caller.
+     * This information is not authenticated and should be treated accordingly.
+     * For example:
+     * +   `google-api-python-client/1.4.0`:
+     *     The request was made by the Google API client for Python.
+     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+     *     The request was made by the Google Cloud SDK CLI (gcloud).
+     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+     * s~my-project`:
+     *     The request was made from the `my-project` App Engine app.
+     * 
+ * + * string caller_supplied_user_agent = 2; + * @return The callerSuppliedUserAgent. + */ + java.lang.String getCallerSuppliedUserAgent(); + /** + *
+     * The user agent of the caller.
+     * This information is not authenticated and should be treated accordingly.
+     * For example:
+     * +   `google-api-python-client/1.4.0`:
+     *     The request was made by the Google API client for Python.
+     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+     *     The request was made by the Google Cloud SDK CLI (gcloud).
+     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+     * s~my-project`:
+     *     The request was made from the `my-project` App Engine app.
+     * 
+ * + * string caller_supplied_user_agent = 2; + * @return The bytes for callerSuppliedUserAgent. + */ + com.google.protobuf.ByteString + getCallerSuppliedUserAgentBytes(); + } + /** + *
+   * Metadata about the request.
+   * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.RequestMetadata} + */ + public static final class RequestMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.RequestMetadata) + RequestMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestMetadata.newBuilder() to construct. + private RequestMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RequestMetadata() { + callerIp_ = ""; + callerSuppliedUserAgent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RequestMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RequestMetadata( + 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(); + + callerIp_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + callerSuppliedUserAgent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.RequestMetadata.class, google.events.cloud.audit.v1.Data.RequestMetadata.Builder.class); + } + + public static final int CALLER_IP_FIELD_NUMBER = 1; + private volatile java.lang.Object callerIp_; + /** + *
+     * The IP address of the caller.
+     * 
+ * + * string caller_ip = 1; + * @return The callerIp. + */ + @java.lang.Override + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + 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(); + callerIp_ = s; + return s; + } + } + /** + *
+     * The IP address of the caller.
+     * 
+ * + * string caller_ip = 1; + * @return The bytes for callerIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_SUPPLIED_USER_AGENT_FIELD_NUMBER = 2; + private volatile java.lang.Object callerSuppliedUserAgent_; + /** + *
+     * The user agent of the caller.
+     * This information is not authenticated and should be treated accordingly.
+     * For example:
+     * +   `google-api-python-client/1.4.0`:
+     *     The request was made by the Google API client for Python.
+     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+     *     The request was made by the Google Cloud SDK CLI (gcloud).
+     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+     * s~my-project`:
+     *     The request was made from the `my-project` App Engine app.
+     * 
+ * + * string caller_supplied_user_agent = 2; + * @return The callerSuppliedUserAgent. + */ + @java.lang.Override + public java.lang.String getCallerSuppliedUserAgent() { + java.lang.Object ref = callerSuppliedUserAgent_; + 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(); + callerSuppliedUserAgent_ = s; + return s; + } + } + /** + *
+     * The user agent of the caller.
+     * This information is not authenticated and should be treated accordingly.
+     * For example:
+     * +   `google-api-python-client/1.4.0`:
+     *     The request was made by the Google API client for Python.
+     * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+     *     The request was made by the Google Cloud SDK CLI (gcloud).
+     * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+     * s~my-project`:
+     *     The request was made from the `my-project` App Engine app.
+     * 
+ * + * string caller_supplied_user_agent = 2; + * @return The bytes for callerSuppliedUserAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCallerSuppliedUserAgentBytes() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerSuppliedUserAgent_ = 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 (!getCallerIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, callerIp_); + } + if (!getCallerSuppliedUserAgentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, callerSuppliedUserAgent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCallerIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, callerIp_); + } + if (!getCallerSuppliedUserAgentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, callerSuppliedUserAgent_); + } + 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 google.events.cloud.audit.v1.Data.RequestMetadata)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.RequestMetadata other = (google.events.cloud.audit.v1.Data.RequestMetadata) obj; + + if (!getCallerIp() + .equals(other.getCallerIp())) return false; + if (!getCallerSuppliedUserAgent() + .equals(other.getCallerSuppliedUserAgent())) 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) + CALLER_IP_FIELD_NUMBER; + hash = (53 * hash) + getCallerIp().hashCode(); + hash = (37 * hash) + CALLER_SUPPLIED_USER_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getCallerSuppliedUserAgent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata 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 google.events.cloud.audit.v1.Data.RequestMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata 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 google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata 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(google.events.cloud.audit.v1.Data.RequestMetadata 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; + } + /** + *
+     * Metadata about the request.
+     * 
+ * + * Protobuf type {@code google.events.cloud.audit.v1.RequestMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.RequestMetadata) + google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.RequestMetadata.class, google.events.cloud.audit.v1.Data.RequestMetadata.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.RequestMetadata.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(); + callerIp_ = ""; + + callerSuppliedUserAgent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata build() { + google.events.cloud.audit.v1.Data.RequestMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata buildPartial() { + google.events.cloud.audit.v1.Data.RequestMetadata result = new google.events.cloud.audit.v1.Data.RequestMetadata(this); + result.callerIp_ = callerIp_; + result.callerSuppliedUserAgent_ = callerSuppliedUserAgent_; + 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 google.events.cloud.audit.v1.Data.RequestMetadata) { + return mergeFrom((google.events.cloud.audit.v1.Data.RequestMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.RequestMetadata other) { + if (other == google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance()) return this; + if (!other.getCallerIp().isEmpty()) { + callerIp_ = other.callerIp_; + onChanged(); + } + if (!other.getCallerSuppliedUserAgent().isEmpty()) { + callerSuppliedUserAgent_ = other.callerSuppliedUserAgent_; + 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 { + google.events.cloud.audit.v1.Data.RequestMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.RequestMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object callerIp_ = ""; + /** + *
+       * The IP address of the caller.
+       * 
+ * + * string caller_ip = 1; + * @return The callerIp. + */ + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The IP address of the caller.
+       * 
+ * + * string caller_ip = 1; + * @return The bytes for callerIp. + */ + public com.google.protobuf.ByteString + getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The IP address of the caller.
+       * 
+ * + * string caller_ip = 1; + * @param value The callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + callerIp_ = value; + onChanged(); + return this; + } + /** + *
+       * The IP address of the caller.
+       * 
+ * + * string caller_ip = 1; + * @return This builder for chaining. + */ + public Builder clearCallerIp() { + + callerIp_ = getDefaultInstance().getCallerIp(); + onChanged(); + return this; + } + /** + *
+       * The IP address of the caller.
+       * 
+ * + * string caller_ip = 1; + * @param value The bytes for callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + callerIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object callerSuppliedUserAgent_ = ""; + /** + *
+       * The user agent of the caller.
+       * This information is not authenticated and should be treated accordingly.
+       * For example:
+       * +   `google-api-python-client/1.4.0`:
+       *     The request was made by the Google API client for Python.
+       * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+       *     The request was made by the Google Cloud SDK CLI (gcloud).
+       * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+       * s~my-project`:
+       *     The request was made from the `my-project` App Engine app.
+       * 
+ * + * string caller_supplied_user_agent = 2; + * @return The callerSuppliedUserAgent. + */ + public java.lang.String getCallerSuppliedUserAgent() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerSuppliedUserAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The user agent of the caller.
+       * This information is not authenticated and should be treated accordingly.
+       * For example:
+       * +   `google-api-python-client/1.4.0`:
+       *     The request was made by the Google API client for Python.
+       * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+       *     The request was made by the Google Cloud SDK CLI (gcloud).
+       * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+       * s~my-project`:
+       *     The request was made from the `my-project` App Engine app.
+       * 
+ * + * string caller_supplied_user_agent = 2; + * @return The bytes for callerSuppliedUserAgent. + */ + public com.google.protobuf.ByteString + getCallerSuppliedUserAgentBytes() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerSuppliedUserAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The user agent of the caller.
+       * This information is not authenticated and should be treated accordingly.
+       * For example:
+       * +   `google-api-python-client/1.4.0`:
+       *     The request was made by the Google API client for Python.
+       * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+       *     The request was made by the Google Cloud SDK CLI (gcloud).
+       * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+       * s~my-project`:
+       *     The request was made from the `my-project` App Engine app.
+       * 
+ * + * string caller_supplied_user_agent = 2; + * @param value The callerSuppliedUserAgent to set. + * @return This builder for chaining. + */ + public Builder setCallerSuppliedUserAgent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + callerSuppliedUserAgent_ = value; + onChanged(); + return this; + } + /** + *
+       * The user agent of the caller.
+       * This information is not authenticated and should be treated accordingly.
+       * For example:
+       * +   `google-api-python-client/1.4.0`:
+       *     The request was made by the Google API client for Python.
+       * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+       *     The request was made by the Google Cloud SDK CLI (gcloud).
+       * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+       * s~my-project`:
+       *     The request was made from the `my-project` App Engine app.
+       * 
+ * + * string caller_supplied_user_agent = 2; + * @return This builder for chaining. + */ + public Builder clearCallerSuppliedUserAgent() { + + callerSuppliedUserAgent_ = getDefaultInstance().getCallerSuppliedUserAgent(); + onChanged(); + return this; + } + /** + *
+       * The user agent of the caller.
+       * This information is not authenticated and should be treated accordingly.
+       * For example:
+       * +   `google-api-python-client/1.4.0`:
+       *     The request was made by the Google API client for Python.
+       * +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
+       *     The request was made by the Google Cloud SDK CLI (gcloud).
+       * +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
+       * s~my-project`:
+       *     The request was made from the `my-project` App Engine app.
+       * 
+ * + * string caller_supplied_user_agent = 2; + * @param value The bytes for callerSuppliedUserAgent to set. + * @return This builder for chaining. + */ + public Builder setCallerSuppliedUserAgentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + callerSuppliedUserAgent_ = 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:google.events.cloud.audit.v1.RequestMetadata) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.RequestMetadata) + private static final google.events.cloud.audit.v1.Data.RequestMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.RequestMetadata(); + } + + public static google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RequestMetadata(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 google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_AuditLogData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_RequestMetadata_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\'google/events/cloud/audit/v1/data.prot" + + "o\022\034google.events.cloud.audit.v1\032\034google/" + + "protobuf/struct.proto\032\027google/rpc/status" + + ".proto\"\371\003\n\014AuditLogData\022\024\n\014service_name\030" + + "\007 \001(\t\022\023\n\013method_name\030\010 \001(\t\022\025\n\rresource_n" + + "ame\030\013 \001(\t\022\032\n\022num_response_items\030\014 \001(\003\022\"\n" + + "\006status\030\002 \001(\0132\022.google.rpc.Status\022M\n\023aut" + + "hentication_info\030\003 \001(\01320.google.events.c" + + "loud.audit.v1.AuthenticationInfo\022K\n\022auth" + + "orization_info\030\t \003(\0132/.google.events.clo" + + "ud.audit.v1.AuthorizationInfo\022G\n\020request" + + "_metadata\030\004 \001(\0132-.google.events.cloud.au" + + "dit.v1.RequestMetadata\022(\n\007request\030\020 \001(\0132" + + "\027.google.protobuf.Struct\022)\n\010response\030\021 \001" + + "(\0132\027.google.protobuf.Struct\022-\n\014service_d" + + "ata\030\017 \001(\0132\027.google.protobuf.Struct\"-\n\022Au" + + "thenticationInfo\022\027\n\017principal_email\030\001 \001(" + + "\t\"J\n\021AuthorizationInfo\022\020\n\010resource\030\001 \001(\t" + + "\022\022\n\npermission\030\002 \001(\t\022\017\n\007granted\030\003 \001(\010\"H\n" + + "\017RequestMetadata\022\021\n\tcaller_ip\030\001 \001(\t\022\"\n\032c" + + "aller_supplied_user_agent\030\002 \001(\tB(\252\002%Goog" + + "le.Events.Protobuf.Cloud.Audit.V1b\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_audit_v1_AuditLogData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor, + new java.lang.String[] { "ServiceName", "MethodName", "ResourceName", "NumResponseItems", "Status", "AuthenticationInfo", "AuthorizationInfo", "RequestMetadata", "Request", "Response", "ServiceData", }); + internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor, + new java.lang.String[] { "PrincipalEmail", }); + internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor, + new java.lang.String[] { "Resource", "Permission", "Granted", }); + internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor, + new java.lang.String[] { "CallerIp", "CallerSuppliedUserAgent", }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/google/events/cloud/firestore/v1/Data.java b/src/google/events/cloud/firestore/v1/Data.java new file mode 100644 index 00000000..b7efa0e8 --- /dev/null +++ b/src/google/events/cloud/firestore/v1/Data.java @@ -0,0 +1,9136 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/firestore/v1/data.proto + +package google.events.cloud.firestore.v1; + +public final class Data { + private Data() {} + 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 DocumentEventDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.firestore.v1.DocumentEventData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A Document object containing a post-operation document snapshot.
+     * This is not populated for delete events. (TODO: check this!)
+     * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + *
+     * A Document object containing a post-operation document snapshot.
+     * This is not populated for delete events. (TODO: check this!)
+     * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + * @return The value. + */ + google.events.cloud.firestore.v1.Data.Document getValue(); + /** + *
+     * A Document object containing a post-operation document snapshot.
+     * This is not populated for delete events. (TODO: check this!)
+     * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + google.events.cloud.firestore.v1.Data.DocumentOrBuilder getValueOrBuilder(); + + /** + *
+     * A Document object containing a pre-operation document snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + * @return Whether the oldValue field is set. + */ + boolean hasOldValue(); + /** + *
+     * A Document object containing a pre-operation document snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + * @return The oldValue. + */ + google.events.cloud.firestore.v1.Data.Document getOldValue(); + /** + *
+     * A Document object containing a pre-operation document snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + google.events.cloud.firestore.v1.Data.DocumentOrBuilder getOldValueOrBuilder(); + + /** + *
+     * A DocumentMask object that lists changed fields.
+     * This is only populated for update events.
+     * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+     * A DocumentMask object that lists changed fields.
+     * This is only populated for update events.
+     * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + * @return The updateMask. + */ + google.events.cloud.firestore.v1.Data.DocumentMask getUpdateMask(); + /** + *
+     * A DocumentMask object that lists changed fields.
+     * This is only populated for update events.
+     * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + int getWildcardsCount(); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + boolean containsWildcards( + java.lang.String key); + /** + * Use {@link #getWildcardsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getWildcards(); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + java.util.Map + getWildcardsMap(); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + + java.lang.String getWildcardsOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + + java.lang.String getWildcardsOrThrow( + java.lang.String key); + } + /** + *
+   * The data within all Firestore document events.
+   * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.DocumentEventData} + */ + public static final class DocumentEventData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.firestore.v1.DocumentEventData) + DocumentEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentEventData.newBuilder() to construct. + private DocumentEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DocumentEventData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DocumentEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DocumentEventData( + 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: { + google.events.cloud.firestore.v1.Data.Document.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(google.events.cloud.firestore.v1.Data.Document.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + google.events.cloud.firestore.v1.Data.Document.Builder subBuilder = null; + if (oldValue_ != null) { + subBuilder = oldValue_.toBuilder(); + } + oldValue_ = input.readMessage(google.events.cloud.firestore.v1.Data.Document.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(oldValue_); + oldValue_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + google.events.cloud.firestore.v1.Data.DocumentMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(google.events.cloud.firestore.v1.Data.DocumentMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + wildcards_ = com.google.protobuf.MapField.newMapField( + WildcardsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + wildcards__ = input.readMessage( + WildcardsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + wildcards_.getMutableMap().put( + wildcards__.getKey(), wildcards__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetWildcards(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.DocumentEventData.class, google.events.cloud.firestore.v1.Data.DocumentEventData.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private google.events.cloud.firestore.v1.Data.Document value_; + /** + *
+     * A Document object containing a post-operation document snapshot.
+     * This is not populated for delete events. (TODO: check this!)
+     * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + *
+     * A Document object containing a post-operation document snapshot.
+     * This is not populated for delete events. (TODO: check this!)
+     * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + * @return The value. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Document getValue() { + return value_ == null ? google.events.cloud.firestore.v1.Data.Document.getDefaultInstance() : value_; + } + /** + *
+     * A Document object containing a post-operation document snapshot.
+     * This is not populated for delete events. (TODO: check this!)
+     * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentOrBuilder getValueOrBuilder() { + return getValue(); + } + + public static final int OLD_VALUE_FIELD_NUMBER = 2; + private google.events.cloud.firestore.v1.Data.Document oldValue_; + /** + *
+     * A Document object containing a pre-operation document snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + * @return Whether the oldValue field is set. + */ + @java.lang.Override + public boolean hasOldValue() { + return oldValue_ != null; + } + /** + *
+     * A Document object containing a pre-operation document snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + * @return The oldValue. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Document getOldValue() { + return oldValue_ == null ? google.events.cloud.firestore.v1.Data.Document.getDefaultInstance() : oldValue_; + } + /** + *
+     * A Document object containing a pre-operation document snapshot.
+     * This is only populated for update and delete events.
+     * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentOrBuilder getOldValueOrBuilder() { + return getOldValue(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private google.events.cloud.firestore.v1.Data.DocumentMask updateMask_; + /** + *
+     * A DocumentMask object that lists changed fields.
+     * This is only populated for update events.
+     * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+     * A DocumentMask object that lists changed fields.
+     * This is only populated for update events.
+     * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentMask getUpdateMask() { + return updateMask_ == null ? google.events.cloud.firestore.v1.Data.DocumentMask.getDefaultInstance() : updateMask_; + } + /** + *
+     * A DocumentMask object that lists changed fields.
+     * This is only populated for update events.
+     * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int WILDCARDS_FIELD_NUMBER = 4; + private static final class WildcardsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentEventData_WildcardsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> wildcards_; + private com.google.protobuf.MapField + internalGetWildcards() { + if (wildcards_ == null) { + return com.google.protobuf.MapField.emptyMapField( + WildcardsDefaultEntryHolder.defaultEntry); + } + return wildcards_; + } + + public int getWildcardsCount() { + return internalGetWildcards().getMap().size(); + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + + @java.lang.Override + public boolean containsWildcards( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetWildcards().getMap().containsKey(key); + } + /** + * Use {@link #getWildcardsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getWildcards() { + return getWildcardsMap(); + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + @java.lang.Override + + public java.util.Map getWildcardsMap() { + return internalGetWildcards().getMap(); + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 4; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().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 { + if (value_ != null) { + output.writeMessage(1, getValue()); + } + if (oldValue_ != null) { + output.writeMessage(2, getOldValue()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetWildcards(), + WildcardsDefaultEntryHolder.defaultEntry, + 4); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValue()); + } + if (oldValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOldValue()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + for (java.util.Map.Entry entry + : internalGetWildcards().getMap().entrySet()) { + com.google.protobuf.MapEntry + wildcards__ = WildcardsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, wildcards__); + } + 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 google.events.cloud.firestore.v1.Data.DocumentEventData)) { + return super.equals(obj); + } + google.events.cloud.firestore.v1.Data.DocumentEventData other = (google.events.cloud.firestore.v1.Data.DocumentEventData) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (hasOldValue() != other.hasOldValue()) return false; + if (hasOldValue()) { + if (!getOldValue() + .equals(other.getOldValue())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!internalGetWildcards().equals( + other.internalGetWildcards())) 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 (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + if (hasOldValue()) { + hash = (37 * hash) + OLD_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getOldValue().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (!internalGetWildcards().getMap().isEmpty()) { + hash = (37 * hash) + WILDCARDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetWildcards().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData 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 google.events.cloud.firestore.v1.Data.DocumentEventData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData 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 google.events.cloud.firestore.v1.Data.DocumentEventData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.DocumentEventData 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(google.events.cloud.firestore.v1.Data.DocumentEventData 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; + } + /** + *
+     * The data within all Firestore document events.
+     * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.DocumentEventData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.firestore.v1.DocumentEventData) + google.events.cloud.firestore.v1.Data.DocumentEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetWildcards(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableWildcards(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.DocumentEventData.class, google.events.cloud.firestore.v1.Data.DocumentEventData.Builder.class); + } + + // Construct using google.events.cloud.firestore.v1.Data.DocumentEventData.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 (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + if (oldValueBuilder_ == null) { + oldValue_ = null; + } else { + oldValue_ = null; + oldValueBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + internalGetMutableWildcards().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentEventData getDefaultInstanceForType() { + return google.events.cloud.firestore.v1.Data.DocumentEventData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentEventData build() { + google.events.cloud.firestore.v1.Data.DocumentEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentEventData buildPartial() { + google.events.cloud.firestore.v1.Data.DocumentEventData result = new google.events.cloud.firestore.v1.Data.DocumentEventData(this); + int from_bitField0_ = bitField0_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + if (oldValueBuilder_ == null) { + result.oldValue_ = oldValue_; + } else { + result.oldValue_ = oldValueBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.wildcards_ = internalGetWildcards(); + result.wildcards_.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 google.events.cloud.firestore.v1.Data.DocumentEventData) { + return mergeFrom((google.events.cloud.firestore.v1.Data.DocumentEventData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.firestore.v1.Data.DocumentEventData other) { + if (other == google.events.cloud.firestore.v1.Data.DocumentEventData.getDefaultInstance()) return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + if (other.hasOldValue()) { + mergeOldValue(other.getOldValue()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + internalGetMutableWildcards().mergeFrom( + other.internalGetWildcards()); + 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 { + google.events.cloud.firestore.v1.Data.DocumentEventData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.firestore.v1.Data.DocumentEventData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private google.events.cloud.firestore.v1.Data.Document value_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Document, google.events.cloud.firestore.v1.Data.Document.Builder, google.events.cloud.firestore.v1.Data.DocumentOrBuilder> valueBuilder_; + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + * @return The value. + */ + public google.events.cloud.firestore.v1.Data.Document getValue() { + if (valueBuilder_ == null) { + return value_ == null ? google.events.cloud.firestore.v1.Data.Document.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + public Builder setValue(google.events.cloud.firestore.v1.Data.Document value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + public Builder setValue( + google.events.cloud.firestore.v1.Data.Document.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + public Builder mergeValue(google.events.cloud.firestore.v1.Data.Document value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + google.events.cloud.firestore.v1.Data.Document.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + public google.events.cloud.firestore.v1.Data.Document.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + public google.events.cloud.firestore.v1.Data.DocumentOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + google.events.cloud.firestore.v1.Data.Document.getDefaultInstance() : value_; + } + } + /** + *
+       * A Document object containing a post-operation document snapshot.
+       * This is not populated for delete events. (TODO: check this!)
+       * 
+ * + * .google.events.cloud.firestore.v1.Document value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Document, google.events.cloud.firestore.v1.Data.Document.Builder, google.events.cloud.firestore.v1.Data.DocumentOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Document, google.events.cloud.firestore.v1.Data.Document.Builder, google.events.cloud.firestore.v1.Data.DocumentOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + + private google.events.cloud.firestore.v1.Data.Document oldValue_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Document, google.events.cloud.firestore.v1.Data.Document.Builder, google.events.cloud.firestore.v1.Data.DocumentOrBuilder> oldValueBuilder_; + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + * @return Whether the oldValue field is set. + */ + public boolean hasOldValue() { + return oldValueBuilder_ != null || oldValue_ != null; + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + * @return The oldValue. + */ + public google.events.cloud.firestore.v1.Data.Document getOldValue() { + if (oldValueBuilder_ == null) { + return oldValue_ == null ? google.events.cloud.firestore.v1.Data.Document.getDefaultInstance() : oldValue_; + } else { + return oldValueBuilder_.getMessage(); + } + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + public Builder setOldValue(google.events.cloud.firestore.v1.Data.Document value) { + if (oldValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldValue_ = value; + onChanged(); + } else { + oldValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + public Builder setOldValue( + google.events.cloud.firestore.v1.Data.Document.Builder builderForValue) { + if (oldValueBuilder_ == null) { + oldValue_ = builderForValue.build(); + onChanged(); + } else { + oldValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + public Builder mergeOldValue(google.events.cloud.firestore.v1.Data.Document value) { + if (oldValueBuilder_ == null) { + if (oldValue_ != null) { + oldValue_ = + google.events.cloud.firestore.v1.Data.Document.newBuilder(oldValue_).mergeFrom(value).buildPartial(); + } else { + oldValue_ = value; + } + onChanged(); + } else { + oldValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + public Builder clearOldValue() { + if (oldValueBuilder_ == null) { + oldValue_ = null; + onChanged(); + } else { + oldValue_ = null; + oldValueBuilder_ = null; + } + + return this; + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + public google.events.cloud.firestore.v1.Data.Document.Builder getOldValueBuilder() { + + onChanged(); + return getOldValueFieldBuilder().getBuilder(); + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + public google.events.cloud.firestore.v1.Data.DocumentOrBuilder getOldValueOrBuilder() { + if (oldValueBuilder_ != null) { + return oldValueBuilder_.getMessageOrBuilder(); + } else { + return oldValue_ == null ? + google.events.cloud.firestore.v1.Data.Document.getDefaultInstance() : oldValue_; + } + } + /** + *
+       * A Document object containing a pre-operation document snapshot.
+       * This is only populated for update and delete events.
+       * 
+ * + * .google.events.cloud.firestore.v1.Document old_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Document, google.events.cloud.firestore.v1.Data.Document.Builder, google.events.cloud.firestore.v1.Data.DocumentOrBuilder> + getOldValueFieldBuilder() { + if (oldValueBuilder_ == null) { + oldValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Document, google.events.cloud.firestore.v1.Data.Document.Builder, google.events.cloud.firestore.v1.Data.DocumentOrBuilder>( + getOldValue(), + getParentForChildren(), + isClean()); + oldValue_ = null; + } + return oldValueBuilder_; + } + + private google.events.cloud.firestore.v1.Data.DocumentMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.DocumentMask, google.events.cloud.firestore.v1.Data.DocumentMask.Builder, google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder> updateMaskBuilder_; + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + * @return The updateMask. + */ + public google.events.cloud.firestore.v1.Data.DocumentMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? google.events.cloud.firestore.v1.Data.DocumentMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + public Builder setUpdateMask(google.events.cloud.firestore.v1.Data.DocumentMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + public Builder setUpdateMask( + google.events.cloud.firestore.v1.Data.DocumentMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + public Builder mergeUpdateMask(google.events.cloud.firestore.v1.Data.DocumentMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + google.events.cloud.firestore.v1.Data.DocumentMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + public google.events.cloud.firestore.v1.Data.DocumentMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + public google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + google.events.cloud.firestore.v1.Data.DocumentMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+       * A DocumentMask object that lists changed fields.
+       * This is only populated for update events.
+       * 
+ * + * .google.events.cloud.firestore.v1.DocumentMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.DocumentMask, google.events.cloud.firestore.v1.Data.DocumentMask.Builder, google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.DocumentMask, google.events.cloud.firestore.v1.Data.DocumentMask.Builder, google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> wildcards_; + private com.google.protobuf.MapField + internalGetWildcards() { + if (wildcards_ == null) { + return com.google.protobuf.MapField.emptyMapField( + WildcardsDefaultEntryHolder.defaultEntry); + } + return wildcards_; + } + private com.google.protobuf.MapField + internalGetMutableWildcards() { + onChanged();; + if (wildcards_ == null) { + wildcards_ = com.google.protobuf.MapField.newMapField( + WildcardsDefaultEntryHolder.defaultEntry); + } + if (!wildcards_.isMutable()) { + wildcards_ = wildcards_.copy(); + } + return wildcards_; + } + + public int getWildcardsCount() { + return internalGetWildcards().getMap().size(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + + @java.lang.Override + public boolean containsWildcards( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetWildcards().getMap().containsKey(key); + } + /** + * Use {@link #getWildcardsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getWildcards() { + return getWildcardsMap(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + @java.lang.Override + + public java.util.Map getWildcardsMap() { + return internalGetWildcards().getMap(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearWildcards() { + internalGetMutableWildcards().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + + public Builder removeWildcards( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableWildcards().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableWildcards() { + return internalGetMutableWildcards().getMutableMap(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + public Builder putWildcards( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableWildcards().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 4; + */ + + public Builder putAllWildcards( + java.util.Map values) { + internalGetMutableWildcards().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:google.events.cloud.firestore.v1.DocumentEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.firestore.v1.DocumentEventData) + private static final google.events.cloud.firestore.v1.Data.DocumentEventData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.firestore.v1.Data.DocumentEventData(); + } + + public static google.events.cloud.firestore.v1.Data.DocumentEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DocumentEventData(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 google.events.cloud.firestore.v1.Data.DocumentEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DocumentMaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.firestore.v1.DocumentMask) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @return A list containing the fieldPaths. + */ + java.util.List + getFieldPathsList(); + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @return The count of fieldPaths. + */ + int getFieldPathsCount(); + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @param index The index of the element to return. + * @return The fieldPaths at the given index. + */ + java.lang.String getFieldPaths(int index); + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @param index The index of the value to return. + * @return The bytes of the fieldPaths at the given index. + */ + com.google.protobuf.ByteString + getFieldPathsBytes(int index); + } + /** + *
+   * A set of field paths on a document.
+   * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.DocumentMask} + */ + public static final class DocumentMask extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.firestore.v1.DocumentMask) + DocumentMaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentMask.newBuilder() to construct. + private DocumentMask(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DocumentMask() { + fieldPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DocumentMask(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DocumentMask( + 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)) { + fieldPaths_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldPaths_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fieldPaths_ = fieldPaths_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.DocumentMask.class, google.events.cloud.firestore.v1.Data.DocumentMask.Builder.class); + } + + public static final int FIELD_PATHS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList fieldPaths_; + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @return A list containing the fieldPaths. + */ + public com.google.protobuf.ProtocolStringList + getFieldPathsList() { + return fieldPaths_; + } + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @return The count of fieldPaths. + */ + public int getFieldPathsCount() { + return fieldPaths_.size(); + } + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @param index The index of the element to return. + * @return The fieldPaths at the given index. + */ + public java.lang.String getFieldPaths(int index) { + return fieldPaths_.get(index); + } + /** + *
+     * The list of field paths in the mask.
+     * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+     * for a field path syntax reference.
+     * 
+ * + * repeated string field_paths = 1; + * @param index The index of the value to return. + * @return The bytes of the fieldPaths at the given index. + */ + public com.google.protobuf.ByteString + getFieldPathsBytes(int index) { + return fieldPaths_.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 < fieldPaths_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldPaths_.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 < fieldPaths_.size(); i++) { + dataSize += computeStringSizeNoTag(fieldPaths_.getRaw(i)); + } + size += dataSize; + size += 1 * getFieldPathsList().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 google.events.cloud.firestore.v1.Data.DocumentMask)) { + return super.equals(obj); + } + google.events.cloud.firestore.v1.Data.DocumentMask other = (google.events.cloud.firestore.v1.Data.DocumentMask) obj; + + if (!getFieldPathsList() + .equals(other.getFieldPathsList())) 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 (getFieldPathsCount() > 0) { + hash = (37 * hash) + FIELD_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getFieldPathsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask 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 google.events.cloud.firestore.v1.Data.DocumentMask parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask 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 google.events.cloud.firestore.v1.Data.DocumentMask parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.DocumentMask 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(google.events.cloud.firestore.v1.Data.DocumentMask 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; + } + /** + *
+     * A set of field paths on a document.
+     * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.DocumentMask} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.firestore.v1.DocumentMask) + google.events.cloud.firestore.v1.Data.DocumentMaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.DocumentMask.class, google.events.cloud.firestore.v1.Data.DocumentMask.Builder.class); + } + + // Construct using google.events.cloud.firestore.v1.Data.DocumentMask.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(); + fieldPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_DocumentMask_descriptor; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentMask getDefaultInstanceForType() { + return google.events.cloud.firestore.v1.Data.DocumentMask.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentMask build() { + google.events.cloud.firestore.v1.Data.DocumentMask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.DocumentMask buildPartial() { + google.events.cloud.firestore.v1.Data.DocumentMask result = new google.events.cloud.firestore.v1.Data.DocumentMask(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + fieldPaths_ = fieldPaths_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldPaths_ = fieldPaths_; + 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 google.events.cloud.firestore.v1.Data.DocumentMask) { + return mergeFrom((google.events.cloud.firestore.v1.Data.DocumentMask)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.firestore.v1.Data.DocumentMask other) { + if (other == google.events.cloud.firestore.v1.Data.DocumentMask.getDefaultInstance()) return this; + if (!other.fieldPaths_.isEmpty()) { + if (fieldPaths_.isEmpty()) { + fieldPaths_ = other.fieldPaths_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldPathsIsMutable(); + fieldPaths_.addAll(other.fieldPaths_); + } + 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 { + google.events.cloud.firestore.v1.Data.DocumentMask parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.firestore.v1.Data.DocumentMask) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList fieldPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFieldPathsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fieldPaths_ = new com.google.protobuf.LazyStringArrayList(fieldPaths_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @return A list containing the fieldPaths. + */ + public com.google.protobuf.ProtocolStringList + getFieldPathsList() { + return fieldPaths_.getUnmodifiableView(); + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @return The count of fieldPaths. + */ + public int getFieldPathsCount() { + return fieldPaths_.size(); + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @param index The index of the element to return. + * @return The fieldPaths at the given index. + */ + public java.lang.String getFieldPaths(int index) { + return fieldPaths_.get(index); + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @param index The index of the value to return. + * @return The bytes of the fieldPaths at the given index. + */ + public com.google.protobuf.ByteString + getFieldPathsBytes(int index) { + return fieldPaths_.getByteString(index); + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @param index The index to set the value at. + * @param value The fieldPaths to set. + * @return This builder for chaining. + */ + public Builder setFieldPaths( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsIsMutable(); + fieldPaths_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @param value The fieldPaths to add. + * @return This builder for chaining. + */ + public Builder addFieldPaths( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsIsMutable(); + fieldPaths_.add(value); + onChanged(); + return this; + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @param values The fieldPaths to add. + * @return This builder for chaining. + */ + public Builder addAllFieldPaths( + java.lang.Iterable values) { + ensureFieldPathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fieldPaths_); + onChanged(); + return this; + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @return This builder for chaining. + */ + public Builder clearFieldPaths() { + fieldPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The list of field paths in the mask.
+       * See [Document.fields][google.cloud.firestore.v1.events.Document.fields]
+       * for a field path syntax reference.
+       * 
+ * + * repeated string field_paths = 1; + * @param value The bytes of the fieldPaths to add. + * @return This builder for chaining. + */ + public Builder addFieldPathsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldPathsIsMutable(); + fieldPaths_.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:google.events.cloud.firestore.v1.DocumentMask) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.firestore.v1.DocumentMask) + private static final google.events.cloud.firestore.v1.Data.DocumentMask DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.firestore.v1.Data.DocumentMask(); + } + + public static google.events.cloud.firestore.v1.Data.DocumentMask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentMask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DocumentMask(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 google.events.cloud.firestore.v1.Data.DocumentMask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DocumentOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.firestore.v1.Document) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The resource name of the document, for example
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The resource name of the document, for example
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + int getFieldsCount(); + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + boolean containsFields( + java.lang.String key); + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFields(); + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + java.util.Map + getFieldsMap(); + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + + google.events.cloud.firestore.v1.Data.Value getFieldsOrDefault( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value defaultValue); + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + + google.events.cloud.firestore.v1.Data.Value getFieldsOrThrow( + java.lang.String key); + + /** + *
+     * The time at which the document was created.
+     * This value increases monotonically when a document is deleted then
+     * recreated. It can also be compared to values from other documents and
+     * the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+     * The time at which the document was created.
+     * This value increases monotonically when a document is deleted then
+     * recreated. It can also be compared to values from other documents and
+     * the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+     * The time at which the document was created.
+     * This value increases monotonically when a document is deleted then
+     * recreated. It can also be compared to values from other documents and
+     * the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+     * The time at which the document was last changed.
+     * This value is initially set to the `create_time` then increases
+     * monotonically with each change to the document. It can also be
+     * compared to values from other documents and the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+     * The time at which the document was last changed.
+     * This value is initially set to the `create_time` then increases
+     * monotonically with each change to the document. It can also be
+     * compared to values from other documents and the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+     * The time at which the document was last changed.
+     * This value is initially set to the `create_time` then increases
+     * monotonically with each change to the document. It can also be
+     * compared to values from other documents and the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + } + /** + *
+   * A Firestore document.
+   * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.Document} + */ + public static final class Document extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.firestore.v1.Document) + DocumentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Document.newBuilder() to construct. + private Document(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Document() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Document(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Document( + 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(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + fields__ = input.readMessage( + FieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + fields_.getMutableMap().put( + fields__.getKey(), fields__.getValue()); + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Document_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Document_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.Document.class, google.events.cloud.firestore.v1.Data.Document.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The resource name of the document, for example
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
+     * The resource name of the document, for example
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELDS_FIELD_NUMBER = 2; + private static final class FieldsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, google.events.cloud.firestore.v1.Data.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Document_FieldsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + google.events.cloud.firestore.v1.Data.Value.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, google.events.cloud.firestore.v1.Data.Value> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + + @java.lang.Override + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + @java.lang.Override + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrDefault( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The document's fields.
+     * The map keys represent field names.
+     * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+     * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+     * `foo_bar_17`.
+     * Field names matching the regular expression `__.*__` are reserved. Reserved
+     * field names are forbidden except in certain documented contexts. The map
+     * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+     * empty.
+     * Field paths may be used in other contexts to refer to structured fields
+     * defined here. For `map_value`, the field path is represented by the simple
+     * or quoted field names of the containing fields, delimited by `.`. For
+     * example, the structured field
+     * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+     * represented by the field path `foo.x&y`.
+     * Within a field path, a quoted field name starts and ends with `` ` `` and
+     * may contain any character. Some characters, including `` ` ``, must be
+     * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+     * `` `bak\`tik` `` represents `` bak`tik ``.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + *
+     * The time at which the document was created.
+     * This value increases monotonically when a document is deleted then
+     * recreated. It can also be compared to values from other documents and
+     * the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+     * The time at which the document was created.
+     * This value increases monotonically when a document is deleted then
+     * recreated. It can also be compared to values from other documents and
+     * the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+     * The time at which the document was created.
+     * This value increases monotonically when a document is deleted then
+     * recreated. It can also be compared to values from other documents and
+     * the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+     * The time at which the document was last changed.
+     * This value is initially set to the `create_time` then increases
+     * monotonically with each change to the document. It can also be
+     * compared to values from other documents and the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+     * The time at which the document was last changed.
+     * This value is initially set to the `create_time` then increases
+     * monotonically with each change to the document. It can also be
+     * compared to values from other documents and the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+     * The time at which the document was last changed.
+     * This value is initially set to the `create_time` then increases
+     * monotonically with each change to the document. It can also be
+     * compared to values from other documents and the `read_time` of a query.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFields(), + FieldsDefaultEntryHolder.defaultEntry, + 2); + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetFields().getMap().entrySet()) { + com.google.protobuf.MapEntry + fields__ = FieldsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fields__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getUpdateTime()); + } + 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 google.events.cloud.firestore.v1.Data.Document)) { + return super.equals(obj); + } + google.events.cloud.firestore.v1.Data.Document other = (google.events.cloud.firestore.v1.Data.Document) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetFields().equals( + other.internalGetFields())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetFields().getMap().isEmpty()) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFields().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.firestore.v1.Data.Document parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.Document parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.Document parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.Document parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.Document parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.Document parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.Document parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.Document 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 google.events.cloud.firestore.v1.Data.Document parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.Document 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 google.events.cloud.firestore.v1.Data.Document parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.Document 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(google.events.cloud.firestore.v1.Data.Document 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; + } + /** + *
+     * A Firestore document.
+     * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.Document} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.firestore.v1.Document) + google.events.cloud.firestore.v1.Data.DocumentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Document_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Document_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.Document.class, google.events.cloud.firestore.v1.Data.Document.Builder.class); + } + + // Construct using google.events.cloud.firestore.v1.Data.Document.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(); + name_ = ""; + + internalGetMutableFields().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Document_descriptor; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Document getDefaultInstanceForType() { + return google.events.cloud.firestore.v1.Data.Document.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Document build() { + google.events.cloud.firestore.v1.Data.Document result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Document buildPartial() { + google.events.cloud.firestore.v1.Data.Document result = new google.events.cloud.firestore.v1.Data.Document(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.fields_ = internalGetFields(); + result.fields_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.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 google.events.cloud.firestore.v1.Data.Document) { + return mergeFrom((google.events.cloud.firestore.v1.Data.Document)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.firestore.v1.Data.Document other) { + if (other == google.events.cloud.firestore.v1.Data.Document.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableFields().mergeFrom( + other.internalGetFields()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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 { + google.events.cloud.firestore.v1.Data.Document parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.firestore.v1.Data.Document) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * The resource name of the document, for example
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource name of the document, for example
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource name of the document, for example
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource name of the document, for example
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The resource name of the document, for example
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, google.events.cloud.firestore.v1.Data.Value> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + private com.google.protobuf.MapField + internalGetMutableFields() { + onChanged();; + if (fields_ == null) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + if (!fields_.isMutable()) { + fields_ = fields_.copy(); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + + @java.lang.Override + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + @java.lang.Override + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrDefault( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFields() { + internalGetMutableFields().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + + public Builder removeFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFields().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFields() { + return internalGetMutableFields().getMutableMap(); + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + public Builder putFields( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFields().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The document's fields.
+       * The map keys represent field names.
+       * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+       * `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
+       * `foo_bar_17`.
+       * Field names matching the regular expression `__.*__` are reserved. Reserved
+       * field names are forbidden except in certain documented contexts. The map
+       * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+       * empty.
+       * Field paths may be used in other contexts to refer to structured fields
+       * defined here. For `map_value`, the field path is represented by the simple
+       * or quoted field names of the containing fields, delimited by `.`. For
+       * example, the structured field
+       * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+       * represented by the field path `foo.x&y`.
+       * Within a field path, a quoted field name starts and ends with `` ` `` and
+       * may contain any character. Some characters, including `` ` ``, must be
+       * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+       * `` `bak\`tik` `` represents `` bak`tik ``.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 2; + */ + + public Builder putAllFields( + java.util.Map values) { + internalGetMutableFields().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+       * The time at which the document was created.
+       * This value increases monotonically when a document is deleted then
+       * recreated. It can also be compared to values from other documents and
+       * the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+       * The time at which the document was last changed.
+       * This value is initially set to the `create_time` then increases
+       * monotonically with each change to the document. It can also be
+       * compared to values from other documents and the `read_time` of a query.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + @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:google.events.cloud.firestore.v1.Document) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.firestore.v1.Document) + private static final google.events.cloud.firestore.v1.Data.Document DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.firestore.v1.Data.Document(); + } + + public static google.events.cloud.firestore.v1.Data.Document getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Document parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Document(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 google.events.cloud.firestore.v1.Data.Document getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.firestore.v1.Value) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return The enum numeric value on the wire for nullValue. + */ + int getNullValueValue(); + /** + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return The nullValue. + */ + com.google.protobuf.NullValue getNullValue(); + + /** + *
+     * A boolean value.
+     * 
+ * + * bool boolean_value = 1; + * @return The booleanValue. + */ + boolean getBooleanValue(); + + /** + *
+     * An integer value.
+     * 
+ * + * int64 integer_value = 2; + * @return The integerValue. + */ + long getIntegerValue(); + + /** + *
+     * A double value.
+     * 
+ * + * double double_value = 3; + * @return The doubleValue. + */ + double getDoubleValue(); + + /** + *
+     * A timestamp value.
+     * Precise only to microseconds. When stored, any additional precision is
+     * rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + /** + *
+     * A timestamp value.
+     * Precise only to microseconds. When stored, any additional precision is
+     * rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * @return The timestampValue. + */ + com.google.protobuf.Timestamp getTimestampValue(); + /** + *
+     * A timestamp value.
+     * Precise only to microseconds. When stored, any additional precision is
+     * rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); + + /** + *
+     * A string value.
+     * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+     * Only the first 1,500 bytes of the UTF-8 representation are considered by
+     * queries.
+     * 
+ * + * string string_value = 17; + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + *
+     * A string value.
+     * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+     * Only the first 1,500 bytes of the UTF-8 representation are considered by
+     * queries.
+     * 
+ * + * string string_value = 17; + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + *
+     * A bytes value.
+     * Must not exceed 1 MiB - 89 bytes.
+     * Only the first 1,500 bytes are considered by queries.
+     * 
+ * + * bytes bytes_value = 18; + * @return The bytesValue. + */ + com.google.protobuf.ByteString getBytesValue(); + + /** + *
+     * A reference to a document. For example:
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string reference_value = 5; + * @return The referenceValue. + */ + java.lang.String getReferenceValue(); + /** + *
+     * A reference to a document. For example:
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string reference_value = 5; + * @return The bytes for referenceValue. + */ + com.google.protobuf.ByteString + getReferenceValueBytes(); + + /** + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + * @return Whether the geoPointValue field is set. + */ + boolean hasGeoPointValue(); + /** + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + * @return The geoPointValue. + */ + com.google.type.LatLng getGeoPointValue(); + /** + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder(); + + /** + *
+     * An array value.
+     * Cannot directly contain another array value, though can contain an
+     * map which contains another array.
+     * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + * @return Whether the arrayValue field is set. + */ + boolean hasArrayValue(); + /** + *
+     * An array value.
+     * Cannot directly contain another array value, though can contain an
+     * map which contains another array.
+     * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + * @return The arrayValue. + */ + google.events.cloud.firestore.v1.Data.ArrayValue getArrayValue(); + /** + *
+     * An array value.
+     * Cannot directly contain another array value, though can contain an
+     * map which contains another array.
+     * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder getArrayValueOrBuilder(); + + /** + *
+     * A map value.
+     * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + * @return Whether the mapValue field is set. + */ + boolean hasMapValue(); + /** + *
+     * A map value.
+     * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + * @return The mapValue. + */ + google.events.cloud.firestore.v1.Data.MapValue getMapValue(); + /** + *
+     * A map value.
+     * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + google.events.cloud.firestore.v1.Data.MapValueOrBuilder getMapValueOrBuilder(); + + public google.events.cloud.firestore.v1.Data.Value.ValueTypeCase getValueTypeCase(); + } + /** + *
+   * A message that can hold any of the supported value types.
+   * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.Value} + */ + public static final class Value extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.firestore.v1.Value) + ValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Value() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Value(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Value( + 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: { + valueTypeCase_ = 1; + valueType_ = input.readBool(); + break; + } + case 16: { + valueTypeCase_ = 2; + valueType_ = input.readInt64(); + break; + } + case 25: { + valueTypeCase_ = 3; + valueType_ = input.readDouble(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + valueTypeCase_ = 5; + valueType_ = s; + break; + } + case 50: { + google.events.cloud.firestore.v1.Data.MapValue.Builder subBuilder = null; + if (valueTypeCase_ == 6) { + subBuilder = ((google.events.cloud.firestore.v1.Data.MapValue) valueType_).toBuilder(); + } + valueType_ = + input.readMessage(google.events.cloud.firestore.v1.Data.MapValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((google.events.cloud.firestore.v1.Data.MapValue) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 6; + break; + } + case 66: { + com.google.type.LatLng.Builder subBuilder = null; + if (valueTypeCase_ == 8) { + subBuilder = ((com.google.type.LatLng) valueType_).toBuilder(); + } + valueType_ = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.LatLng) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 8; + break; + } + case 74: { + google.events.cloud.firestore.v1.Data.ArrayValue.Builder subBuilder = null; + if (valueTypeCase_ == 9) { + subBuilder = ((google.events.cloud.firestore.v1.Data.ArrayValue) valueType_).toBuilder(); + } + valueType_ = + input.readMessage(google.events.cloud.firestore.v1.Data.ArrayValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((google.events.cloud.firestore.v1.Data.ArrayValue) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 9; + break; + } + case 82: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (valueTypeCase_ == 10) { + subBuilder = ((com.google.protobuf.Timestamp) valueType_).toBuilder(); + } + valueType_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 10; + break; + } + case 88: { + int rawValue = input.readEnum(); + valueTypeCase_ = 11; + valueType_ = rawValue; + break; + } + case 138: { + java.lang.String s = input.readStringRequireUtf8(); + valueTypeCase_ = 17; + valueType_ = s; + break; + } + case 146: { + valueTypeCase_ = 18; + valueType_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.Value.class, google.events.cloud.firestore.v1.Data.Value.Builder.class); + } + + private int valueTypeCase_ = 0; + private java.lang.Object valueType_; + public enum ValueTypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NULL_VALUE(11), + BOOLEAN_VALUE(1), + INTEGER_VALUE(2), + DOUBLE_VALUE(3), + TIMESTAMP_VALUE(10), + STRING_VALUE(17), + BYTES_VALUE(18), + REFERENCE_VALUE(5), + GEO_POINT_VALUE(8), + ARRAY_VALUE(9), + MAP_VALUE(6), + VALUETYPE_NOT_SET(0); + private final int value; + private ValueTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ValueTypeCase forNumber(int value) { + switch (value) { + case 11: return NULL_VALUE; + case 1: return BOOLEAN_VALUE; + case 2: return INTEGER_VALUE; + case 3: return DOUBLE_VALUE; + case 10: return TIMESTAMP_VALUE; + case 17: return STRING_VALUE; + case 18: return BYTES_VALUE; + case 5: return REFERENCE_VALUE; + case 8: return GEO_POINT_VALUE; + case 9: return ARRAY_VALUE; + case 6: return MAP_VALUE; + case 0: return VALUETYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueTypeCase + getValueTypeCase() { + return ValueTypeCase.forNumber( + valueTypeCase_); + } + + public static final int NULL_VALUE_FIELD_NUMBER = 11; + /** + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return The enum numeric value on the wire for nullValue. + */ + public int getNullValueValue() { + if (valueTypeCase_ == 11) { + return (java.lang.Integer) valueType_; + } + return 0; + } + /** + *
+     * A null value.
+     * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return The nullValue. + */ + public com.google.protobuf.NullValue getNullValue() { + if (valueTypeCase_ == 11) { + @SuppressWarnings("deprecation") + com.google.protobuf.NullValue result = com.google.protobuf.NullValue.valueOf( + (java.lang.Integer) valueType_); + return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; + } + return com.google.protobuf.NullValue.NULL_VALUE; + } + + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 1; + /** + *
+     * A boolean value.
+     * 
+ * + * bool boolean_value = 1; + * @return The booleanValue. + */ + @java.lang.Override + public boolean getBooleanValue() { + if (valueTypeCase_ == 1) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + public static final int INTEGER_VALUE_FIELD_NUMBER = 2; + /** + *
+     * An integer value.
+     * 
+ * + * int64 integer_value = 2; + * @return The integerValue. + */ + @java.lang.Override + public long getIntegerValue() { + if (valueTypeCase_ == 2) { + return (java.lang.Long) valueType_; + } + return 0L; + } + + public static final int DOUBLE_VALUE_FIELD_NUMBER = 3; + /** + *
+     * A double value.
+     * 
+ * + * double double_value = 3; + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + if (valueTypeCase_ == 3) { + return (java.lang.Double) valueType_; + } + return 0D; + } + + public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 10; + /** + *
+     * A timestamp value.
+     * Precise only to microseconds. When stored, any additional precision is
+     * rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return valueTypeCase_ == 10; + } + /** + *
+     * A timestamp value.
+     * Precise only to microseconds. When stored, any additional precision is
+     * rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + *
+     * A timestamp value.
+     * Precise only to microseconds. When stored, any additional precision is
+     * rounded down.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int STRING_VALUE_FIELD_NUMBER = 17; + /** + *
+     * A string value.
+     * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+     * Only the first 1,500 bytes of the UTF-8 representation are considered by
+     * queries.
+     * 
+ * + * string string_value = 17; + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + 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(); + if (valueTypeCase_ == 17) { + valueType_ = s; + } + return s; + } + } + /** + *
+     * A string value.
+     * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+     * Only the first 1,500 bytes of the UTF-8 representation are considered by
+     * queries.
+     * 
+ * + * string string_value = 17; + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueTypeCase_ == 17) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BYTES_VALUE_FIELD_NUMBER = 18; + /** + *
+     * A bytes value.
+     * Must not exceed 1 MiB - 89 bytes.
+     * Only the first 1,500 bytes are considered by queries.
+     * 
+ * + * bytes bytes_value = 18; + * @return The bytesValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBytesValue() { + if (valueTypeCase_ == 18) { + return (com.google.protobuf.ByteString) valueType_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int REFERENCE_VALUE_FIELD_NUMBER = 5; + /** + *
+     * A reference to a document. For example:
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string reference_value = 5; + * @return The referenceValue. + */ + public java.lang.String getReferenceValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + ref = valueType_; + } + 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(); + if (valueTypeCase_ == 5) { + valueType_ = s; + } + return s; + } + } + /** + *
+     * A reference to a document. For example:
+     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+     * 
+ * + * string reference_value = 5; + * @return The bytes for referenceValue. + */ + public com.google.protobuf.ByteString + getReferenceValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueTypeCase_ == 5) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GEO_POINT_VALUE_FIELD_NUMBER = 8; + /** + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + * @return Whether the geoPointValue field is set. + */ + @java.lang.Override + public boolean hasGeoPointValue() { + return valueTypeCase_ == 8; + } + /** + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + * @return The geoPointValue. + */ + @java.lang.Override + public com.google.type.LatLng getGeoPointValue() { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + /** + *
+     * A geo point value representing a point on the surface of Earth.
+     * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + public static final int ARRAY_VALUE_FIELD_NUMBER = 9; + /** + *
+     * An array value.
+     * Cannot directly contain another array value, though can contain an
+     * map which contains another array.
+     * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return valueTypeCase_ == 9; + } + /** + *
+     * An array value.
+     * Cannot directly contain another array value, though can contain an
+     * map which contains another array.
+     * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + * @return The arrayValue. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValue getArrayValue() { + if (valueTypeCase_ == 9) { + return (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } + /** + *
+     * An array value.
+     * Cannot directly contain another array value, though can contain an
+     * map which contains another array.
+     * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder getArrayValueOrBuilder() { + if (valueTypeCase_ == 9) { + return (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } + + public static final int MAP_VALUE_FIELD_NUMBER = 6; + /** + *
+     * A map value.
+     * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + * @return Whether the mapValue field is set. + */ + @java.lang.Override + public boolean hasMapValue() { + return valueTypeCase_ == 6; + } + /** + *
+     * A map value.
+     * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + * @return The mapValue. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValue getMapValue() { + if (valueTypeCase_ == 6) { + return (google.events.cloud.firestore.v1.Data.MapValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } + /** + *
+     * A map value.
+     * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValueOrBuilder getMapValueOrBuilder() { + if (valueTypeCase_ == 6) { + return (google.events.cloud.firestore.v1.Data.MapValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } + + 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 (valueTypeCase_ == 1) { + output.writeBool( + 1, (boolean)((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 2) { + output.writeInt64( + 2, (long)((java.lang.Long) valueType_)); + } + if (valueTypeCase_ == 3) { + output.writeDouble( + 3, (double)((java.lang.Double) valueType_)); + } + if (valueTypeCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueType_); + } + if (valueTypeCase_ == 6) { + output.writeMessage(6, (google.events.cloud.firestore.v1.Data.MapValue) valueType_); + } + if (valueTypeCase_ == 8) { + output.writeMessage(8, (com.google.type.LatLng) valueType_); + } + if (valueTypeCase_ == 9) { + output.writeMessage(9, (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_); + } + if (valueTypeCase_ == 10) { + output.writeMessage(10, (com.google.protobuf.Timestamp) valueType_); + } + if (valueTypeCase_ == 11) { + output.writeEnum(11, ((java.lang.Integer) valueType_)); + } + if (valueTypeCase_ == 17) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, valueType_); + } + if (valueTypeCase_ == 18) { + output.writeBytes( + 18, (com.google.protobuf.ByteString) valueType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueTypeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 1, (boolean)((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 2, (long)((java.lang.Long) valueType_)); + } + if (valueTypeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize( + 3, (double)((java.lang.Double) valueType_)); + } + if (valueTypeCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueType_); + } + if (valueTypeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (google.events.cloud.firestore.v1.Data.MapValue) valueType_); + } + if (valueTypeCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.type.LatLng) valueType_); + } + if (valueTypeCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_); + } + if (valueTypeCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (com.google.protobuf.Timestamp) valueType_); + } + if (valueTypeCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, ((java.lang.Integer) valueType_)); + } + if (valueTypeCase_ == 17) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, valueType_); + } + if (valueTypeCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize( + 18, (com.google.protobuf.ByteString) valueType_); + } + 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 google.events.cloud.firestore.v1.Data.Value)) { + return super.equals(obj); + } + google.events.cloud.firestore.v1.Data.Value other = (google.events.cloud.firestore.v1.Data.Value) obj; + + if (!getValueTypeCase().equals(other.getValueTypeCase())) return false; + switch (valueTypeCase_) { + case 11: + if (getNullValueValue() + != other.getNullValueValue()) return false; + break; + case 1: + if (getBooleanValue() + != other.getBooleanValue()) return false; + break; + case 2: + if (getIntegerValue() + != other.getIntegerValue()) return false; + break; + case 3: + if (java.lang.Double.doubleToLongBits(getDoubleValue()) + != java.lang.Double.doubleToLongBits( + other.getDoubleValue())) return false; + break; + case 10: + if (!getTimestampValue() + .equals(other.getTimestampValue())) return false; + break; + case 17: + if (!getStringValue() + .equals(other.getStringValue())) return false; + break; + case 18: + if (!getBytesValue() + .equals(other.getBytesValue())) return false; + break; + case 5: + if (!getReferenceValue() + .equals(other.getReferenceValue())) return false; + break; + case 8: + if (!getGeoPointValue() + .equals(other.getGeoPointValue())) return false; + break; + case 9: + if (!getArrayValue() + .equals(other.getArrayValue())) return false; + break; + case 6: + if (!getMapValue() + .equals(other.getMapValue())) return false; + break; + case 0: + default: + } + 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(); + switch (valueTypeCase_) { + case 11: + hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNullValueValue(); + break; + case 1: + hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBooleanValue()); + break; + case 2: + hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIntegerValue()); + break; + case 3: + hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + break; + case 10: + hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampValue().hashCode(); + break; + case 17: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 18: + hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getBytesValue().hashCode(); + break; + case 5: + hash = (37 * hash) + REFERENCE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getReferenceValue().hashCode(); + break; + case 8: + hash = (37 * hash) + GEO_POINT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getGeoPointValue().hashCode(); + break; + case 9: + hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getArrayValue().hashCode(); + break; + case 6: + hash = (37 * hash) + MAP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMapValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.firestore.v1.Data.Value parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.Value parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.Value 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 google.events.cloud.firestore.v1.Data.Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.Value 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 google.events.cloud.firestore.v1.Data.Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.Value 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(google.events.cloud.firestore.v1.Data.Value 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; + } + /** + *
+     * A message that can hold any of the supported value types.
+     * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.Value} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.firestore.v1.Value) + google.events.cloud.firestore.v1.Data.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.Value.class, google.events.cloud.firestore.v1.Data.Value.Builder.class); + } + + // Construct using google.events.cloud.firestore.v1.Data.Value.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(); + valueTypeCase_ = 0; + valueType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_Value_descriptor; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Value getDefaultInstanceForType() { + return google.events.cloud.firestore.v1.Data.Value.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Value build() { + google.events.cloud.firestore.v1.Data.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Value buildPartial() { + google.events.cloud.firestore.v1.Data.Value result = new google.events.cloud.firestore.v1.Data.Value(this); + if (valueTypeCase_ == 11) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 1) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 2) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 3) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 10) { + if (timestampValueBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = timestampValueBuilder_.build(); + } + } + if (valueTypeCase_ == 17) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 18) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 5) { + result.valueType_ = valueType_; + } + if (valueTypeCase_ == 8) { + if (geoPointValueBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = geoPointValueBuilder_.build(); + } + } + if (valueTypeCase_ == 9) { + if (arrayValueBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = arrayValueBuilder_.build(); + } + } + if (valueTypeCase_ == 6) { + if (mapValueBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = mapValueBuilder_.build(); + } + } + result.valueTypeCase_ = valueTypeCase_; + 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 google.events.cloud.firestore.v1.Data.Value) { + return mergeFrom((google.events.cloud.firestore.v1.Data.Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.firestore.v1.Data.Value other) { + if (other == google.events.cloud.firestore.v1.Data.Value.getDefaultInstance()) return this; + switch (other.getValueTypeCase()) { + case NULL_VALUE: { + setNullValueValue(other.getNullValueValue()); + break; + } + case BOOLEAN_VALUE: { + setBooleanValue(other.getBooleanValue()); + break; + } + case INTEGER_VALUE: { + setIntegerValue(other.getIntegerValue()); + break; + } + case DOUBLE_VALUE: { + setDoubleValue(other.getDoubleValue()); + break; + } + case TIMESTAMP_VALUE: { + mergeTimestampValue(other.getTimestampValue()); + break; + } + case STRING_VALUE: { + valueTypeCase_ = 17; + valueType_ = other.valueType_; + onChanged(); + break; + } + case BYTES_VALUE: { + setBytesValue(other.getBytesValue()); + break; + } + case REFERENCE_VALUE: { + valueTypeCase_ = 5; + valueType_ = other.valueType_; + onChanged(); + break; + } + case GEO_POINT_VALUE: { + mergeGeoPointValue(other.getGeoPointValue()); + break; + } + case ARRAY_VALUE: { + mergeArrayValue(other.getArrayValue()); + break; + } + case MAP_VALUE: { + mergeMapValue(other.getMapValue()); + break; + } + case VALUETYPE_NOT_SET: { + break; + } + } + 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 { + google.events.cloud.firestore.v1.Data.Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.firestore.v1.Data.Value) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int valueTypeCase_ = 0; + private java.lang.Object valueType_; + public ValueTypeCase + getValueTypeCase() { + return ValueTypeCase.forNumber( + valueTypeCase_); + } + + public Builder clearValueType() { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + return this; + } + + + /** + *
+       * A null value.
+       * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return The enum numeric value on the wire for nullValue. + */ + @java.lang.Override + public int getNullValueValue() { + if (valueTypeCase_ == 11) { + return ((java.lang.Integer) valueType_).intValue(); + } + return 0; + } + /** + *
+       * A null value.
+       * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @param value The enum numeric value on the wire for nullValue to set. + * @return This builder for chaining. + */ + public Builder setNullValueValue(int value) { + valueTypeCase_ = 11; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * A null value.
+       * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return The nullValue. + */ + @java.lang.Override + public com.google.protobuf.NullValue getNullValue() { + if (valueTypeCase_ == 11) { + @SuppressWarnings("deprecation") + com.google.protobuf.NullValue result = com.google.protobuf.NullValue.valueOf( + (java.lang.Integer) valueType_); + return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; + } + return com.google.protobuf.NullValue.NULL_VALUE; + } + /** + *
+       * A null value.
+       * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @param value The nullValue to set. + * @return This builder for chaining. + */ + public Builder setNullValue(com.google.protobuf.NullValue value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 11; + valueType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * A null value.
+       * 
+ * + * .google.protobuf.NullValue null_value = 11; + * @return This builder for chaining. + */ + public Builder clearNullValue() { + if (valueTypeCase_ == 11) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + *
+       * A boolean value.
+       * 
+ * + * bool boolean_value = 1; + * @return The booleanValue. + */ + public boolean getBooleanValue() { + if (valueTypeCase_ == 1) { + return (java.lang.Boolean) valueType_; + } + return false; + } + /** + *
+       * A boolean value.
+       * 
+ * + * bool boolean_value = 1; + * @param value The booleanValue to set. + * @return This builder for chaining. + */ + public Builder setBooleanValue(boolean value) { + valueTypeCase_ = 1; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * A boolean value.
+       * 
+ * + * bool boolean_value = 1; + * @return This builder for chaining. + */ + public Builder clearBooleanValue() { + if (valueTypeCase_ == 1) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + *
+       * An integer value.
+       * 
+ * + * int64 integer_value = 2; + * @return The integerValue. + */ + public long getIntegerValue() { + if (valueTypeCase_ == 2) { + return (java.lang.Long) valueType_; + } + return 0L; + } + /** + *
+       * An integer value.
+       * 
+ * + * int64 integer_value = 2; + * @param value The integerValue to set. + * @return This builder for chaining. + */ + public Builder setIntegerValue(long value) { + valueTypeCase_ = 2; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * An integer value.
+       * 
+ * + * int64 integer_value = 2; + * @return This builder for chaining. + */ + public Builder clearIntegerValue() { + if (valueTypeCase_ == 2) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + *
+       * A double value.
+       * 
+ * + * double double_value = 3; + * @return The doubleValue. + */ + public double getDoubleValue() { + if (valueTypeCase_ == 3) { + return (java.lang.Double) valueType_; + } + return 0D; + } + /** + *
+       * A double value.
+       * 
+ * + * double double_value = 3; + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + valueTypeCase_ = 3; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * A double value.
+       * 
+ * + * double double_value = 3; + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + if (valueTypeCase_ == 3) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampValueBuilder_; + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return valueTypeCase_ == 10; + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (valueTypeCase_ == 10) { + return timestampValueBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + timestampValueBuilder_.setMessage(value); + } + valueTypeCase_ = 10; + return this; + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder setTimestampValue( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + timestampValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 10; + return this; + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 10 && + valueType_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + valueType_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) valueType_) + .mergeFrom(value).buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 10) { + timestampValueBuilder_.mergeFrom(value); + } + timestampValueBuilder_.setMessage(value); + } + valueTypeCase_ = 10; + return this; + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public Builder clearTimestampValue() { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 10) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 10) { + valueTypeCase_ = 0; + valueType_ = null; + } + timestampValueBuilder_.clear(); + } + return this; + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { + return getTimestampValueFieldBuilder().getBuilder(); + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if ((valueTypeCase_ == 10) && (timestampValueBuilder_ != null)) { + return timestampValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 10) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * A timestamp value.
+       * Precise only to microseconds. When stored, any additional precision is
+       * rounded down.
+       * 
+ * + * .google.protobuf.Timestamp timestamp_value = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampValueFieldBuilder() { + if (timestampValueBuilder_ == null) { + if (!(valueTypeCase_ == 10)) { + valueType_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + timestampValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 10; + onChanged();; + return timestampValueBuilder_; + } + + /** + *
+       * A string value.
+       * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes of the UTF-8 representation are considered by
+       * queries.
+       * 
+ * + * string string_value = 17; + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 17) { + valueType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A string value.
+       * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes of the UTF-8 representation are considered by
+       * queries.
+       * 
+ * + * string string_value = 17; + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 17) { + ref = valueType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueTypeCase_ == 17) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A string value.
+       * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes of the UTF-8 representation are considered by
+       * queries.
+       * 
+ * + * string string_value = 17; + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 17; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * A string value.
+       * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes of the UTF-8 representation are considered by
+       * queries.
+       * 
+ * + * string string_value = 17; + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (valueTypeCase_ == 17) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + /** + *
+       * A string value.
+       * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes of the UTF-8 representation are considered by
+       * queries.
+       * 
+ * + * string string_value = 17; + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueTypeCase_ = 17; + valueType_ = value; + onChanged(); + return this; + } + + /** + *
+       * A bytes value.
+       * Must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes are considered by queries.
+       * 
+ * + * bytes bytes_value = 18; + * @return The bytesValue. + */ + public com.google.protobuf.ByteString getBytesValue() { + if (valueTypeCase_ == 18) { + return (com.google.protobuf.ByteString) valueType_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + *
+       * A bytes value.
+       * Must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes are considered by queries.
+       * 
+ * + * bytes bytes_value = 18; + * @param value The bytesValue to set. + * @return This builder for chaining. + */ + public Builder setBytesValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 18; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * A bytes value.
+       * Must not exceed 1 MiB - 89 bytes.
+       * Only the first 1,500 bytes are considered by queries.
+       * 
+ * + * bytes bytes_value = 18; + * @return This builder for chaining. + */ + public Builder clearBytesValue() { + if (valueTypeCase_ == 18) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + *
+       * A reference to a document. For example:
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string reference_value = 5; + * @return The referenceValue. + */ + @java.lang.Override + public java.lang.String getReferenceValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + ref = valueType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 5) { + valueType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A reference to a document. For example:
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string reference_value = 5; + * @return The bytes for referenceValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReferenceValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + ref = valueType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueTypeCase_ == 5) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A reference to a document. For example:
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string reference_value = 5; + * @param value The referenceValue to set. + * @return This builder for chaining. + */ + public Builder setReferenceValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 5; + valueType_ = value; + onChanged(); + return this; + } + /** + *
+       * A reference to a document. For example:
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string reference_value = 5; + * @return This builder for chaining. + */ + public Builder clearReferenceValue() { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + /** + *
+       * A reference to a document. For example:
+       * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+       * 
+ * + * string reference_value = 5; + * @param value The bytes for referenceValue to set. + * @return This builder for chaining. + */ + public Builder setReferenceValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueTypeCase_ = 5; + valueType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> geoPointValueBuilder_; + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + * @return Whether the geoPointValue field is set. + */ + @java.lang.Override + public boolean hasGeoPointValue() { + return valueTypeCase_ == 8; + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + * @return The geoPointValue. + */ + @java.lang.Override + public com.google.type.LatLng getGeoPointValue() { + if (geoPointValueBuilder_ == null) { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } else { + if (valueTypeCase_ == 8) { + return geoPointValueBuilder_.getMessage(); + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder setGeoPointValue(com.google.type.LatLng value) { + if (geoPointValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + geoPointValueBuilder_.setMessage(value); + } + valueTypeCase_ = 8; + return this; + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder setGeoPointValue( + com.google.type.LatLng.Builder builderForValue) { + if (geoPointValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + geoPointValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 8; + return this; + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder mergeGeoPointValue(com.google.type.LatLng value) { + if (geoPointValueBuilder_ == null) { + if (valueTypeCase_ == 8 && + valueType_ != com.google.type.LatLng.getDefaultInstance()) { + valueType_ = com.google.type.LatLng.newBuilder((com.google.type.LatLng) valueType_) + .mergeFrom(value).buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 8) { + geoPointValueBuilder_.mergeFrom(value); + } + geoPointValueBuilder_.setMessage(value); + } + valueTypeCase_ = 8; + return this; + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public Builder clearGeoPointValue() { + if (geoPointValueBuilder_ == null) { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + } + geoPointValueBuilder_.clear(); + } + return this; + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + public com.google.type.LatLng.Builder getGeoPointValueBuilder() { + return getGeoPointValueFieldBuilder().getBuilder(); + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { + if ((valueTypeCase_ == 8) && (geoPointValueBuilder_ != null)) { + return geoPointValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 8) { + return (com.google.type.LatLng) valueType_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + /** + *
+       * A geo point value representing a point on the surface of Earth.
+       * 
+ * + * .google.type.LatLng geo_point_value = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getGeoPointValueFieldBuilder() { + if (geoPointValueBuilder_ == null) { + if (!(valueTypeCase_ == 8)) { + valueType_ = com.google.type.LatLng.getDefaultInstance(); + } + geoPointValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + (com.google.type.LatLng) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 8; + onChanged();; + return geoPointValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.ArrayValue, google.events.cloud.firestore.v1.Data.ArrayValue.Builder, google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder> arrayValueBuilder_; + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return valueTypeCase_ == 9; + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + * @return The arrayValue. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValue getArrayValue() { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 9) { + return (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } else { + if (valueTypeCase_ == 9) { + return arrayValueBuilder_.getMessage(); + } + return google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + public Builder setArrayValue(google.events.cloud.firestore.v1.Data.ArrayValue value) { + if (arrayValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + arrayValueBuilder_.setMessage(value); + } + valueTypeCase_ = 9; + return this; + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + public Builder setArrayValue( + google.events.cloud.firestore.v1.Data.ArrayValue.Builder builderForValue) { + if (arrayValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + arrayValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 9; + return this; + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + public Builder mergeArrayValue(google.events.cloud.firestore.v1.Data.ArrayValue value) { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 9 && + valueType_ != google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance()) { + valueType_ = google.events.cloud.firestore.v1.Data.ArrayValue.newBuilder((google.events.cloud.firestore.v1.Data.ArrayValue) valueType_) + .mergeFrom(value).buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 9) { + arrayValueBuilder_.mergeFrom(value); + } + arrayValueBuilder_.setMessage(value); + } + valueTypeCase_ = 9; + return this; + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + public Builder clearArrayValue() { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + } + arrayValueBuilder_.clear(); + } + return this; + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + public google.events.cloud.firestore.v1.Data.ArrayValue.Builder getArrayValueBuilder() { + return getArrayValueFieldBuilder().getBuilder(); + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder getArrayValueOrBuilder() { + if ((valueTypeCase_ == 9) && (arrayValueBuilder_ != null)) { + return arrayValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 9) { + return (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } + } + /** + *
+       * An array value.
+       * Cannot directly contain another array value, though can contain an
+       * map which contains another array.
+       * 
+ * + * .google.events.cloud.firestore.v1.ArrayValue array_value = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.ArrayValue, google.events.cloud.firestore.v1.Data.ArrayValue.Builder, google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder> + getArrayValueFieldBuilder() { + if (arrayValueBuilder_ == null) { + if (!(valueTypeCase_ == 9)) { + valueType_ = google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } + arrayValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.ArrayValue, google.events.cloud.firestore.v1.Data.ArrayValue.Builder, google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder>( + (google.events.cloud.firestore.v1.Data.ArrayValue) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 9; + onChanged();; + return arrayValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.MapValue, google.events.cloud.firestore.v1.Data.MapValue.Builder, google.events.cloud.firestore.v1.Data.MapValueOrBuilder> mapValueBuilder_; + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + * @return Whether the mapValue field is set. + */ + @java.lang.Override + public boolean hasMapValue() { + return valueTypeCase_ == 6; + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + * @return The mapValue. + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValue getMapValue() { + if (mapValueBuilder_ == null) { + if (valueTypeCase_ == 6) { + return (google.events.cloud.firestore.v1.Data.MapValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } else { + if (valueTypeCase_ == 6) { + return mapValueBuilder_.getMessage(); + } + return google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + public Builder setMapValue(google.events.cloud.firestore.v1.Data.MapValue value) { + if (mapValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + mapValueBuilder_.setMessage(value); + } + valueTypeCase_ = 6; + return this; + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + public Builder setMapValue( + google.events.cloud.firestore.v1.Data.MapValue.Builder builderForValue) { + if (mapValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + mapValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 6; + return this; + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + public Builder mergeMapValue(google.events.cloud.firestore.v1.Data.MapValue value) { + if (mapValueBuilder_ == null) { + if (valueTypeCase_ == 6 && + valueType_ != google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance()) { + valueType_ = google.events.cloud.firestore.v1.Data.MapValue.newBuilder((google.events.cloud.firestore.v1.Data.MapValue) valueType_) + .mergeFrom(value).buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 6) { + mapValueBuilder_.mergeFrom(value); + } + mapValueBuilder_.setMessage(value); + } + valueTypeCase_ = 6; + return this; + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + public Builder clearMapValue() { + if (mapValueBuilder_ == null) { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + } + mapValueBuilder_.clear(); + } + return this; + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + public google.events.cloud.firestore.v1.Data.MapValue.Builder getMapValueBuilder() { + return getMapValueFieldBuilder().getBuilder(); + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValueOrBuilder getMapValueOrBuilder() { + if ((valueTypeCase_ == 6) && (mapValueBuilder_ != null)) { + return mapValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 6) { + return (google.events.cloud.firestore.v1.Data.MapValue) valueType_; + } + return google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } + } + /** + *
+       * A map value.
+       * 
+ * + * .google.events.cloud.firestore.v1.MapValue map_value = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.MapValue, google.events.cloud.firestore.v1.Data.MapValue.Builder, google.events.cloud.firestore.v1.Data.MapValueOrBuilder> + getMapValueFieldBuilder() { + if (mapValueBuilder_ == null) { + if (!(valueTypeCase_ == 6)) { + valueType_ = google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } + mapValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.firestore.v1.Data.MapValue, google.events.cloud.firestore.v1.Data.MapValue.Builder, google.events.cloud.firestore.v1.Data.MapValueOrBuilder>( + (google.events.cloud.firestore.v1.Data.MapValue) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 6; + onChanged();; + return mapValueBuilder_; + } + @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:google.events.cloud.firestore.v1.Value) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.firestore.v1.Value) + private static final google.events.cloud.firestore.v1.Data.Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.firestore.v1.Data.Value(); + } + + public static google.events.cloud.firestore.v1.Data.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Value(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 google.events.cloud.firestore.v1.Data.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ArrayValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.firestore.v1.ArrayValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + java.util.List + getValuesList(); + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + google.events.cloud.firestore.v1.Data.Value getValues(int index); + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + int getValuesCount(); + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + java.util.List + getValuesOrBuilderList(); + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + google.events.cloud.firestore.v1.Data.ValueOrBuilder getValuesOrBuilder( + int index); + } + /** + *
+   * An array value.
+   * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.ArrayValue} + */ + public static final class ArrayValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.firestore.v1.ArrayValue) + ArrayValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayValue.newBuilder() to construct. + private ArrayValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrayValue() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrayValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrayValue( + 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)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add( + input.readMessage(google.events.cloud.firestore.v1.Data.Value.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_ArrayValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_ArrayValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.ArrayValue.class, google.events.cloud.firestore.v1.Data.ArrayValue.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.Value getValues(int index) { + return values_.get(index); + } + /** + *
+     * Values in the array.
+     * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.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 < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + 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 google.events.cloud.firestore.v1.Data.ArrayValue)) { + return super.equals(obj); + } + google.events.cloud.firestore.v1.Data.ArrayValue other = (google.events.cloud.firestore.v1.Data.ArrayValue) obj; + + if (!getValuesList() + .equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue 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 google.events.cloud.firestore.v1.Data.ArrayValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue 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 google.events.cloud.firestore.v1.Data.ArrayValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.ArrayValue 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(google.events.cloud.firestore.v1.Data.ArrayValue 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; + } + /** + *
+     * An array value.
+     * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.ArrayValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.firestore.v1.ArrayValue) + google.events.cloud.firestore.v1.Data.ArrayValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_ArrayValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_ArrayValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.ArrayValue.class, google.events.cloud.firestore.v1.Data.ArrayValue.Builder.class); + } + + // Construct using google.events.cloud.firestore.v1.Data.ArrayValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_ArrayValue_descriptor; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValue getDefaultInstanceForType() { + return google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValue build() { + google.events.cloud.firestore.v1.Data.ArrayValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.ArrayValue buildPartial() { + google.events.cloud.firestore.v1.Data.ArrayValue result = new google.events.cloud.firestore.v1.Data.ArrayValue(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.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 google.events.cloud.firestore.v1.Data.ArrayValue) { + return mergeFrom((google.events.cloud.firestore.v1.Data.ArrayValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.firestore.v1.Data.ArrayValue other) { + if (other == google.events.cloud.firestore.v1.Data.ArrayValue.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + 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 { + google.events.cloud.firestore.v1.Data.ArrayValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.firestore.v1.Data.ArrayValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Value, google.events.cloud.firestore.v1.Data.Value.Builder, google.events.cloud.firestore.v1.Data.ValueOrBuilder> valuesBuilder_; + + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public google.events.cloud.firestore.v1.Data.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder setValues( + int index, google.events.cloud.firestore.v1.Data.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder setValues( + int index, google.events.cloud.firestore.v1.Data.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder addValues(google.events.cloud.firestore.v1.Data.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder addValues( + int index, google.events.cloud.firestore.v1.Data.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder addValues( + google.events.cloud.firestore.v1.Data.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder addValues( + int index, google.events.cloud.firestore.v1.Data.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public google.events.cloud.firestore.v1.Data.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public google.events.cloud.firestore.v1.Data.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public google.events.cloud.firestore.v1.Data.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + google.events.cloud.firestore.v1.Data.Value.getDefaultInstance()); + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public google.events.cloud.firestore.v1.Data.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, google.events.cloud.firestore.v1.Data.Value.getDefaultInstance()); + } + /** + *
+       * Values in the array.
+       * 
+ * + * repeated .google.events.cloud.firestore.v1.Value values = 1; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Value, google.events.cloud.firestore.v1.Data.Value.Builder, google.events.cloud.firestore.v1.Data.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.firestore.v1.Data.Value, google.events.cloud.firestore.v1.Data.Value.Builder, google.events.cloud.firestore.v1.Data.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + @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:google.events.cloud.firestore.v1.ArrayValue) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.firestore.v1.ArrayValue) + private static final google.events.cloud.firestore.v1.Data.ArrayValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.firestore.v1.Data.ArrayValue(); + } + + public static google.events.cloud.firestore.v1.Data.ArrayValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrayValue(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 google.events.cloud.firestore.v1.Data.ArrayValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MapValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.firestore.v1.MapValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + int getFieldsCount(); + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + boolean containsFields( + java.lang.String key); + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFields(); + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + java.util.Map + getFieldsMap(); + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + + google.events.cloud.firestore.v1.Data.Value getFieldsOrDefault( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value defaultValue); + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + + google.events.cloud.firestore.v1.Data.Value getFieldsOrThrow( + java.lang.String key); + } + /** + *
+   * A map value.
+   * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.MapValue} + */ + public static final class MapValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.firestore.v1.MapValue) + MapValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use MapValue.newBuilder() to construct. + private MapValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MapValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MapValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MapValue( + 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)) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + fields__ = input.readMessage( + FieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + fields_.getMutableMap().put( + fields__.getKey(), fields__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_MapValue_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_MapValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.MapValue.class, google.events.cloud.firestore.v1.Data.MapValue.Builder.class); + } + + public static final int FIELDS_FIELD_NUMBER = 1; + private static final class FieldsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, google.events.cloud.firestore.v1.Data.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_MapValue_FieldsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + google.events.cloud.firestore.v1.Data.Value.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, google.events.cloud.firestore.v1.Data.Value> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + + @java.lang.Override + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + @java.lang.Override + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrDefault( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The map's fields.
+     * The map keys represent field names. Field names matching the regular
+     * expression `__.*__` are reserved. Reserved field names are forbidden except
+     * in certain documented contexts. The map keys, represented as UTF-8, must
+     * not exceed 1,500 bytes and cannot be empty.
+     * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().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, + internalGetFields(), + FieldsDefaultEntryHolder.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 + : internalGetFields().getMap().entrySet()) { + com.google.protobuf.MapEntry + fields__ = FieldsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fields__); + } + 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 google.events.cloud.firestore.v1.Data.MapValue)) { + return super.equals(obj); + } + google.events.cloud.firestore.v1.Data.MapValue other = (google.events.cloud.firestore.v1.Data.MapValue) obj; + + if (!internalGetFields().equals( + other.internalGetFields())) 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 (!internalGetFields().getMap().isEmpty()) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFields().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.firestore.v1.Data.MapValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.MapValue 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 google.events.cloud.firestore.v1.Data.MapValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.MapValue 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 google.events.cloud.firestore.v1.Data.MapValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.firestore.v1.Data.MapValue 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(google.events.cloud.firestore.v1.Data.MapValue 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; + } + /** + *
+     * A map value.
+     * 
+ * + * Protobuf type {@code google.events.cloud.firestore.v1.MapValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.firestore.v1.MapValue) + google.events.cloud.firestore.v1.Data.MapValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_MapValue_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_MapValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.firestore.v1.Data.MapValue.class, google.events.cloud.firestore.v1.Data.MapValue.Builder.class); + } + + // Construct using google.events.cloud.firestore.v1.Data.MapValue.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(); + internalGetMutableFields().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.firestore.v1.Data.internal_static_google_events_cloud_firestore_v1_MapValue_descriptor; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValue getDefaultInstanceForType() { + return google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValue build() { + google.events.cloud.firestore.v1.Data.MapValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.firestore.v1.Data.MapValue buildPartial() { + google.events.cloud.firestore.v1.Data.MapValue result = new google.events.cloud.firestore.v1.Data.MapValue(this); + int from_bitField0_ = bitField0_; + result.fields_ = internalGetFields(); + result.fields_.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 google.events.cloud.firestore.v1.Data.MapValue) { + return mergeFrom((google.events.cloud.firestore.v1.Data.MapValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.firestore.v1.Data.MapValue other) { + if (other == google.events.cloud.firestore.v1.Data.MapValue.getDefaultInstance()) return this; + internalGetMutableFields().mergeFrom( + other.internalGetFields()); + 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 { + google.events.cloud.firestore.v1.Data.MapValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.firestore.v1.Data.MapValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, google.events.cloud.firestore.v1.Data.Value> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + private com.google.protobuf.MapField + internalGetMutableFields() { + onChanged();; + if (fields_ == null) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + if (!fields_.isMutable()) { + fields_ = fields_.copy(); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + + @java.lang.Override + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + @java.lang.Override + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrDefault( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + @java.lang.Override + + public google.events.cloud.firestore.v1.Data.Value getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFields() { + internalGetMutableFields().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + + public Builder removeFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFields().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFields() { + return internalGetMutableFields().getMutableMap(); + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + public Builder putFields( + java.lang.String key, + google.events.cloud.firestore.v1.Data.Value value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFields().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The map's fields.
+       * The map keys represent field names. Field names matching the regular
+       * expression `__.*__` are reserved. Reserved field names are forbidden except
+       * in certain documented contexts. The map keys, represented as UTF-8, must
+       * not exceed 1,500 bytes and cannot be empty.
+       * 
+ * + * map<string, .google.events.cloud.firestore.v1.Value> fields = 1; + */ + + public Builder putAllFields( + java.util.Map values) { + internalGetMutableFields().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:google.events.cloud.firestore.v1.MapValue) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.firestore.v1.MapValue) + private static final google.events.cloud.firestore.v1.Data.MapValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.firestore.v1.Data.MapValue(); + } + + public static google.events.cloud.firestore.v1.Data.MapValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MapValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MapValue(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 google.events.cloud.firestore.v1.Data.MapValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_DocumentEventData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_DocumentEventData_WildcardsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_DocumentEventData_WildcardsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_DocumentMask_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_DocumentMask_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_Document_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_Document_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_Document_FieldsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_Document_FieldsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_Value_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_Value_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_ArrayValue_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_ArrayValue_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_MapValue_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_MapValue_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_firestore_v1_MapValue_FieldsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_firestore_v1_MapValue_FieldsEntry_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+google/events/cloud/firestore/v1/data." + + "proto\022 google.events.cloud.firestore.v1\032" + + "\034google/protobuf/struct.proto\032\037google/pr" + + "otobuf/timestamp.proto\032\030google/type/latl" + + "ng.proto\"\333\002\n\021DocumentEventData\0229\n\005value\030" + + "\001 \001(\0132*.google.events.cloud.firestore.v1" + + ".Document\022=\n\told_value\030\002 \001(\0132*.google.ev" + + "ents.cloud.firestore.v1.Document\022C\n\013upda" + + "te_mask\030\003 \001(\0132..google.events.cloud.fire" + + "store.v1.DocumentMask\022U\n\twildcards\030\004 \003(\013" + + "2B.google.events.cloud.firestore.v1.Docu" + + "mentEventData.WildcardsEntry\0320\n\016Wildcard" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"#" + + "\n\014DocumentMask\022\023\n\013field_paths\030\001 \003(\t\"\232\002\n\010" + + "Document\022\014\n\004name\030\001 \001(\t\022F\n\006fields\030\002 \003(\01326" + + ".google.events.cloud.firestore.v1.Docume" + + "nt.FieldsEntry\022/\n\013create_time\030\003 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022/\n\013update_time\030\004" + + " \001(\0132\032.google.protobuf.Timestamp\032V\n\013Fiel" + + "dsEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value\030\002 \001(\0132\'.go" + + "ogle.events.cloud.firestore.v1.Value:\0028\001" + + "\"\310\003\n\005Value\0220\n\nnull_value\030\013 \001(\0162\032.google." + + "protobuf.NullValueH\000\022\027\n\rboolean_value\030\001 " + + "\001(\010H\000\022\027\n\rinteger_value\030\002 \001(\003H\000\022\026\n\014double" + + "_value\030\003 \001(\001H\000\0225\n\017timestamp_value\030\n \001(\0132" + + "\032.google.protobuf.TimestampH\000\022\026\n\014string_" + + "value\030\021 \001(\tH\000\022\025\n\013bytes_value\030\022 \001(\014H\000\022\031\n\017" + + "reference_value\030\005 \001(\tH\000\022.\n\017geo_point_val" + + "ue\030\010 \001(\0132\023.google.type.LatLngH\000\022C\n\013array" + + "_value\030\t \001(\0132,.google.events.cloud.fires" + + "tore.v1.ArrayValueH\000\022?\n\tmap_value\030\006 \001(\0132" + + "*.google.events.cloud.firestore.v1.MapVa" + + "lueH\000B\014\n\nvalue_type\"E\n\nArrayValue\0227\n\006val" + + "ues\030\001 \003(\0132\'.google.events.cloud.firestor" + + "e.v1.Value\"\252\001\n\010MapValue\022F\n\006fields\030\001 \003(\0132" + + "6.google.events.cloud.firestore.v1.MapVa" + + "lue.FieldsEntry\032V\n\013FieldsEntry\022\013\n\003key\030\001 " + + "\001(\t\0226\n\005value\030\002 \001(\0132\'.google.events.cloud" + + ".firestore.v1.Value:\0028\001B,\252\002)Google.Event" + + "s.Protobuf.Cloud.Firestore.V1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_firestore_v1_DocumentEventData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor, + new java.lang.String[] { "Value", "OldValue", "UpdateMask", "Wildcards", }); + internal_static_google_events_cloud_firestore_v1_DocumentEventData_WildcardsEntry_descriptor = + internal_static_google_events_cloud_firestore_v1_DocumentEventData_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_firestore_v1_DocumentEventData_WildcardsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_DocumentEventData_WildcardsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_events_cloud_firestore_v1_DocumentMask_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_events_cloud_firestore_v1_DocumentMask_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_DocumentMask_descriptor, + new java.lang.String[] { "FieldPaths", }); + internal_static_google_events_cloud_firestore_v1_Document_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_events_cloud_firestore_v1_Document_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_Document_descriptor, + new java.lang.String[] { "Name", "Fields", "CreateTime", "UpdateTime", }); + internal_static_google_events_cloud_firestore_v1_Document_FieldsEntry_descriptor = + internal_static_google_events_cloud_firestore_v1_Document_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_firestore_v1_Document_FieldsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_Document_FieldsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_events_cloud_firestore_v1_Value_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_events_cloud_firestore_v1_Value_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_Value_descriptor, + new java.lang.String[] { "NullValue", "BooleanValue", "IntegerValue", "DoubleValue", "TimestampValue", "StringValue", "BytesValue", "ReferenceValue", "GeoPointValue", "ArrayValue", "MapValue", "ValueType", }); + internal_static_google_events_cloud_firestore_v1_ArrayValue_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_events_cloud_firestore_v1_ArrayValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_ArrayValue_descriptor, + new java.lang.String[] { "Values", }); + internal_static_google_events_cloud_firestore_v1_MapValue_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_events_cloud_firestore_v1_MapValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_MapValue_descriptor, + new java.lang.String[] { "Fields", }); + internal_static_google_events_cloud_firestore_v1_MapValue_FieldsEntry_descriptor = + internal_static_google_events_cloud_firestore_v1_MapValue_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_firestore_v1_MapValue_FieldsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_firestore_v1_MapValue_FieldsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/google/events/cloud/pubsub/v1/Data.java b/src/google/events/cloud/pubsub/v1/Data.java new file mode 100644 index 00000000..8692a04d --- /dev/null +++ b/src/google/events/cloud/pubsub/v1/Data.java @@ -0,0 +1,2070 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/pubsub/v1/data.proto + +package google.events.cloud.pubsub.v1; + +public final class Data { + private Data() {} + 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 MessagePublishedDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.pubsub.v1.MessagePublishedData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The message that was published.
+     * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + * @return Whether the message field is set. + */ + boolean hasMessage(); + /** + *
+     * The message that was published.
+     * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + * @return The message. + */ + google.events.cloud.pubsub.v1.Data.PubsubMessage getMessage(); + /** + *
+     * The message that was published.
+     * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder getMessageOrBuilder(); + + /** + *
+     * The resource name of the subscription for which this event was
+     * generated. The format of the value is
+     * `projects/{project-id}/subscriptions/{subscription-id}`.
+     * 
+ * + * string subscription = 2; + * @return The subscription. + */ + java.lang.String getSubscription(); + /** + *
+     * The resource name of the subscription for which this event was
+     * generated. The format of the value is
+     * `projects/{project-id}/subscriptions/{subscription-id}`.
+     * 
+ * + * string subscription = 2; + * @return The bytes for subscription. + */ + com.google.protobuf.ByteString + getSubscriptionBytes(); + } + /** + *
+   * The data received in an event when a message is published to a topic.
+   * 
+ * + * Protobuf type {@code google.events.cloud.pubsub.v1.MessagePublishedData} + */ + public static final class MessagePublishedData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.pubsub.v1.MessagePublishedData) + MessagePublishedDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use MessagePublishedData.newBuilder() to construct. + private MessagePublishedData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MessagePublishedData() { + subscription_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MessagePublishedData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MessagePublishedData( + 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: { + google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder subBuilder = null; + if (message_ != null) { + subBuilder = message_.toBuilder(); + } + message_ = input.readMessage(google.events.cloud.pubsub.v1.Data.PubsubMessage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(message_); + message_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + subscription_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.pubsub.v1.Data.MessagePublishedData.class, google.events.cloud.pubsub.v1.Data.MessagePublishedData.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private google.events.cloud.pubsub.v1.Data.PubsubMessage message_; + /** + *
+     * The message that was published.
+     * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + * @return Whether the message field is set. + */ + @java.lang.Override + public boolean hasMessage() { + return message_ != null; + } + /** + *
+     * The message that was published.
+     * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + * @return The message. + */ + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.PubsubMessage getMessage() { + return message_ == null ? google.events.cloud.pubsub.v1.Data.PubsubMessage.getDefaultInstance() : message_; + } + /** + *
+     * The message that was published.
+     * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder getMessageOrBuilder() { + return getMessage(); + } + + public static final int SUBSCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object subscription_; + /** + *
+     * The resource name of the subscription for which this event was
+     * generated. The format of the value is
+     * `projects/{project-id}/subscriptions/{subscription-id}`.
+     * 
+ * + * string subscription = 2; + * @return The subscription. + */ + @java.lang.Override + public java.lang.String getSubscription() { + java.lang.Object ref = subscription_; + 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(); + subscription_ = s; + return s; + } + } + /** + *
+     * The resource name of the subscription for which this event was
+     * generated. The format of the value is
+     * `projects/{project-id}/subscriptions/{subscription-id}`.
+     * 
+ * + * string subscription = 2; + * @return The bytes for subscription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubscriptionBytes() { + java.lang.Object ref = subscription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subscription_ = 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 (message_ != null) { + output.writeMessage(1, getMessage()); + } + if (!getSubscriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subscription_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (message_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMessage()); + } + if (!getSubscriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subscription_); + } + 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 google.events.cloud.pubsub.v1.Data.MessagePublishedData)) { + return super.equals(obj); + } + google.events.cloud.pubsub.v1.Data.MessagePublishedData other = (google.events.cloud.pubsub.v1.Data.MessagePublishedData) obj; + + if (hasMessage() != other.hasMessage()) return false; + if (hasMessage()) { + if (!getMessage() + .equals(other.getMessage())) return false; + } + if (!getSubscription() + .equals(other.getSubscription())) 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 (hasMessage()) { + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + } + hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getSubscription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData 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 google.events.cloud.pubsub.v1.Data.MessagePublishedData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData 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 google.events.cloud.pubsub.v1.Data.MessagePublishedData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData 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(google.events.cloud.pubsub.v1.Data.MessagePublishedData 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; + } + /** + *
+     * The data received in an event when a message is published to a topic.
+     * 
+ * + * Protobuf type {@code google.events.cloud.pubsub.v1.MessagePublishedData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.pubsub.v1.MessagePublishedData) + google.events.cloud.pubsub.v1.Data.MessagePublishedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.pubsub.v1.Data.MessagePublishedData.class, google.events.cloud.pubsub.v1.Data.MessagePublishedData.Builder.class); + } + + // Construct using google.events.cloud.pubsub.v1.Data.MessagePublishedData.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 (messageBuilder_ == null) { + message_ = null; + } else { + message_ = null; + messageBuilder_ = null; + } + subscription_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_descriptor; + } + + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.MessagePublishedData getDefaultInstanceForType() { + return google.events.cloud.pubsub.v1.Data.MessagePublishedData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.MessagePublishedData build() { + google.events.cloud.pubsub.v1.Data.MessagePublishedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.MessagePublishedData buildPartial() { + google.events.cloud.pubsub.v1.Data.MessagePublishedData result = new google.events.cloud.pubsub.v1.Data.MessagePublishedData(this); + if (messageBuilder_ == null) { + result.message_ = message_; + } else { + result.message_ = messageBuilder_.build(); + } + result.subscription_ = subscription_; + 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 google.events.cloud.pubsub.v1.Data.MessagePublishedData) { + return mergeFrom((google.events.cloud.pubsub.v1.Data.MessagePublishedData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.pubsub.v1.Data.MessagePublishedData other) { + if (other == google.events.cloud.pubsub.v1.Data.MessagePublishedData.getDefaultInstance()) return this; + if (other.hasMessage()) { + mergeMessage(other.getMessage()); + } + if (!other.getSubscription().isEmpty()) { + subscription_ = other.subscription_; + 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 { + google.events.cloud.pubsub.v1.Data.MessagePublishedData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.pubsub.v1.Data.MessagePublishedData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private google.events.cloud.pubsub.v1.Data.PubsubMessage message_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.pubsub.v1.Data.PubsubMessage, google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder, google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder> messageBuilder_; + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + * @return Whether the message field is set. + */ + public boolean hasMessage() { + return messageBuilder_ != null || message_ != null; + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + * @return The message. + */ + public google.events.cloud.pubsub.v1.Data.PubsubMessage getMessage() { + if (messageBuilder_ == null) { + return message_ == null ? google.events.cloud.pubsub.v1.Data.PubsubMessage.getDefaultInstance() : message_; + } else { + return messageBuilder_.getMessage(); + } + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + public Builder setMessage(google.events.cloud.pubsub.v1.Data.PubsubMessage value) { + if (messageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + messageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + public Builder setMessage( + google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder builderForValue) { + if (messageBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + messageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + public Builder mergeMessage(google.events.cloud.pubsub.v1.Data.PubsubMessage value) { + if (messageBuilder_ == null) { + if (message_ != null) { + message_ = + google.events.cloud.pubsub.v1.Data.PubsubMessage.newBuilder(message_).mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + messageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + public Builder clearMessage() { + if (messageBuilder_ == null) { + message_ = null; + onChanged(); + } else { + message_ = null; + messageBuilder_ = null; + } + + return this; + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + public google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder getMessageBuilder() { + + onChanged(); + return getMessageFieldBuilder().getBuilder(); + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + public google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder getMessageOrBuilder() { + if (messageBuilder_ != null) { + return messageBuilder_.getMessageOrBuilder(); + } else { + return message_ == null ? + google.events.cloud.pubsub.v1.Data.PubsubMessage.getDefaultInstance() : message_; + } + } + /** + *
+       * The message that was published.
+       * 
+ * + * .google.events.cloud.pubsub.v1.PubsubMessage message = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.pubsub.v1.Data.PubsubMessage, google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder, google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder> + getMessageFieldBuilder() { + if (messageBuilder_ == null) { + messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.pubsub.v1.Data.PubsubMessage, google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder, google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder>( + getMessage(), + getParentForChildren(), + isClean()); + message_ = null; + } + return messageBuilder_; + } + + private java.lang.Object subscription_ = ""; + /** + *
+       * The resource name of the subscription for which this event was
+       * generated. The format of the value is
+       * `projects/{project-id}/subscriptions/{subscription-id}`.
+       * 
+ * + * string subscription = 2; + * @return The subscription. + */ + public java.lang.String getSubscription() { + java.lang.Object ref = subscription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subscription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource name of the subscription for which this event was
+       * generated. The format of the value is
+       * `projects/{project-id}/subscriptions/{subscription-id}`.
+       * 
+ * + * string subscription = 2; + * @return The bytes for subscription. + */ + public com.google.protobuf.ByteString + getSubscriptionBytes() { + java.lang.Object ref = subscription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subscription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource name of the subscription for which this event was
+       * generated. The format of the value is
+       * `projects/{project-id}/subscriptions/{subscription-id}`.
+       * 
+ * + * string subscription = 2; + * @param value The subscription to set. + * @return This builder for chaining. + */ + public Builder setSubscription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subscription_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource name of the subscription for which this event was
+       * generated. The format of the value is
+       * `projects/{project-id}/subscriptions/{subscription-id}`.
+       * 
+ * + * string subscription = 2; + * @return This builder for chaining. + */ + public Builder clearSubscription() { + + subscription_ = getDefaultInstance().getSubscription(); + onChanged(); + return this; + } + /** + *
+       * The resource name of the subscription for which this event was
+       * generated. The format of the value is
+       * `projects/{project-id}/subscriptions/{subscription-id}`.
+       * 
+ * + * string subscription = 2; + * @param value The bytes for subscription to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subscription_ = 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:google.events.cloud.pubsub.v1.MessagePublishedData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.pubsub.v1.MessagePublishedData) + private static final google.events.cloud.pubsub.v1.Data.MessagePublishedData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.pubsub.v1.Data.MessagePublishedData(); + } + + public static google.events.cloud.pubsub.v1.Data.MessagePublishedData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MessagePublishedData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MessagePublishedData(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 google.events.cloud.pubsub.v1.Data.MessagePublishedData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PubsubMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.pubsub.v1.PubsubMessage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The binary data in the message.
+     * 
+ * + * bytes data = 1; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + int getAttributesCount(); + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + boolean containsAttributes( + java.lang.String key); + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttributes(); + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + java.util.Map + getAttributesMap(); + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + + java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + + java.lang.String getAttributesOrThrow( + java.lang.String key); + + /** + *
+     * ID of this message, assigned by the server when the message is published.
+     * Guaranteed to be unique within the topic.
+     * 
+ * + * string message_id = 3; + * @return The messageId. + */ + java.lang.String getMessageId(); + /** + *
+     * ID of this message, assigned by the server when the message is published.
+     * Guaranteed to be unique within the topic.
+     * 
+ * + * string message_id = 3; + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString + getMessageIdBytes(); + } + /** + *
+   * A message published to a topic.
+   * 
+ * + * Protobuf type {@code google.events.cloud.pubsub.v1.PubsubMessage} + */ + public static final class PubsubMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.pubsub.v1.PubsubMessage) + PubsubMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use PubsubMessage.newBuilder() to construct. + private PubsubMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PubsubMessage() { + data_ = com.google.protobuf.ByteString.EMPTY; + messageId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PubsubMessage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PubsubMessage( + 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: { + + data_ = input.readBytes(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + attributes_ = com.google.protobuf.MapField.newMapField( + AttributesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + attributes__ = input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attributes_.getMutableMap().put( + attributes__.getKey(), attributes__.getValue()); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + messageId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_PubsubMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.pubsub.v1.Data.PubsubMessage.class, google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder.class); + } + + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString data_; + /** + *
+     * The binary data in the message.
+     * 
+ * + * bytes data = 1; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 2; + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_PubsubMessage_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> attributes_; + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + + @java.lang.Override + public boolean containsAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + @java.lang.Override + + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + @java.lang.Override + + public java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Attributes for this message.
+     * 
+ * + * map<string, string> attributes = 2; + */ + @java.lang.Override + + public java.lang.String getAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MESSAGE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object messageId_; + /** + *
+     * ID of this message, assigned by the server when the message is published.
+     * Guaranteed to be unique within the topic.
+     * 
+ * + * string message_id = 3; + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + 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(); + messageId_ = s; + return s; + } + } + /** + *
+     * ID of this message, assigned by the server when the message is published.
+     * Guaranteed to be unique within the topic.
+     * 
+ * + * string message_id = 3; + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = 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 (!data_.isEmpty()) { + output.writeBytes(1, data_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttributes(), + AttributesDefaultEntryHolder.defaultEntry, + 2); + if (!getMessageIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, messageId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, data_); + } + for (java.util.Map.Entry entry + : internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry + attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, attributes__); + } + if (!getMessageIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, messageId_); + } + 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 google.events.cloud.pubsub.v1.Data.PubsubMessage)) { + return super.equals(obj); + } + google.events.cloud.pubsub.v1.Data.PubsubMessage other = (google.events.cloud.pubsub.v1.Data.PubsubMessage) obj; + + if (!getData() + .equals(other.getData())) return false; + if (!internalGetAttributes().equals( + other.internalGetAttributes())) return false; + if (!getMessageId() + .equals(other.getMessageId())) 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) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage 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 google.events.cloud.pubsub.v1.Data.PubsubMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage 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 google.events.cloud.pubsub.v1.Data.PubsubMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.pubsub.v1.Data.PubsubMessage 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(google.events.cloud.pubsub.v1.Data.PubsubMessage 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; + } + /** + *
+     * A message published to a topic.
+     * 
+ * + * Protobuf type {@code google.events.cloud.pubsub.v1.PubsubMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.pubsub.v1.PubsubMessage) + google.events.cloud.pubsub.v1.Data.PubsubMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_PubsubMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.pubsub.v1.Data.PubsubMessage.class, google.events.cloud.pubsub.v1.Data.PubsubMessage.Builder.class); + } + + // Construct using google.events.cloud.pubsub.v1.Data.PubsubMessage.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(); + data_ = com.google.protobuf.ByteString.EMPTY; + + internalGetMutableAttributes().clear(); + messageId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.pubsub.v1.Data.internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor; + } + + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.PubsubMessage getDefaultInstanceForType() { + return google.events.cloud.pubsub.v1.Data.PubsubMessage.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.PubsubMessage build() { + google.events.cloud.pubsub.v1.Data.PubsubMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.pubsub.v1.Data.PubsubMessage buildPartial() { + google.events.cloud.pubsub.v1.Data.PubsubMessage result = new google.events.cloud.pubsub.v1.Data.PubsubMessage(this); + int from_bitField0_ = bitField0_; + result.data_ = data_; + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + result.messageId_ = messageId_; + 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 google.events.cloud.pubsub.v1.Data.PubsubMessage) { + return mergeFrom((google.events.cloud.pubsub.v1.Data.PubsubMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.pubsub.v1.Data.PubsubMessage other) { + if (other == google.events.cloud.pubsub.v1.Data.PubsubMessage.getDefaultInstance()) return this; + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + internalGetMutableAttributes().mergeFrom( + other.internalGetAttributes()); + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + 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 { + google.events.cloud.pubsub.v1.Data.PubsubMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.pubsub.v1.Data.PubsubMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The binary data in the message.
+       * 
+ * + * bytes data = 1; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       * The binary data in the message.
+       * 
+ * + * bytes data = 1; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * The binary data in the message.
+       * 
+ * + * bytes data = 1; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> attributes_; + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + private com.google.protobuf.MapField + internalGetMutableAttributes() { + onChanged();; + if (attributes_ == null) { + attributes_ = com.google.protobuf.MapField.newMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + + @java.lang.Override + public boolean containsAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + @java.lang.Override + + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + @java.lang.Override + + public java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + @java.lang.Override + + public java.lang.String getAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + + public Builder removeAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttributes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + public Builder putAttributes( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttributes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Attributes for this message.
+       * 
+ * + * map<string, string> attributes = 2; + */ + + public Builder putAllAttributes( + java.util.Map values) { + internalGetMutableAttributes().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object messageId_ = ""; + /** + *
+       * ID of this message, assigned by the server when the message is published.
+       * Guaranteed to be unique within the topic.
+       * 
+ * + * string message_id = 3; + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * ID of this message, assigned by the server when the message is published.
+       * Guaranteed to be unique within the topic.
+       * 
+ * + * string message_id = 3; + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * ID of this message, assigned by the server when the message is published.
+       * Guaranteed to be unique within the topic.
+       * 
+ * + * string message_id = 3; + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + messageId_ = value; + onChanged(); + return this; + } + /** + *
+       * ID of this message, assigned by the server when the message is published.
+       * Guaranteed to be unique within the topic.
+       * 
+ * + * string message_id = 3; + * @return This builder for chaining. + */ + public Builder clearMessageId() { + + messageId_ = getDefaultInstance().getMessageId(); + onChanged(); + return this; + } + /** + *
+       * ID of this message, assigned by the server when the message is published.
+       * Guaranteed to be unique within the topic.
+       * 
+ * + * string message_id = 3; + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + messageId_ = 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:google.events.cloud.pubsub.v1.PubsubMessage) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.pubsub.v1.PubsubMessage) + private static final google.events.cloud.pubsub.v1.Data.PubsubMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.pubsub.v1.Data.PubsubMessage(); + } + + public static google.events.cloud.pubsub.v1.Data.PubsubMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PubsubMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PubsubMessage(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 google.events.cloud.pubsub.v1.Data.PubsubMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_AttributesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_AttributesEntry_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(google/events/cloud/pubsub/v1/data.pro" + + "to\022\035google.events.cloud.pubsub.v1\"k\n\024Mes" + + "sagePublishedData\022=\n\007message\030\001 \001(\0132,.goo" + + "gle.events.cloud.pubsub.v1.PubsubMessage" + + "\022\024\n\014subscription\030\002 \001(\t\"\266\001\n\rPubsubMessage" + + "\022\014\n\004data\030\001 \001(\014\022P\n\nattributes\030\002 \003(\0132<.goo" + + "gle.events.cloud.pubsub.v1.PubsubMessage" + + ".AttributesEntry\022\022\n\nmessage_id\030\003 \001(\t\0321\n\017" + + "AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001B)\252\002&Google.Events.Protobuf.Cloud" + + ".PubSub.V1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_pubsub_v1_MessagePublishedData_descriptor, + new java.lang.String[] { "Message", "Subscription", }); + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor, + new java.lang.String[] { "Data", "Attributes", "MessageId", }); + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_AttributesEntry_descriptor = + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_AttributesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_pubsub_v1_PubsubMessage_AttributesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/google/events/cloud/scheduler/v1/Data.java b/src/google/events/cloud/scheduler/v1/Data.java new file mode 100644 index 00000000..a0810729 --- /dev/null +++ b/src/google/events/cloud/scheduler/v1/Data.java @@ -0,0 +1,570 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/scheduler/v1/data.proto + +package google.events.cloud.scheduler.v1; + +public final class Data { + private Data() {} + 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 SchedulerJobDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.scheduler.v1.SchedulerJobData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The custom data the user specified when creating the scheduler source.
+     * 
+ * + * bytes custom_data = 1; + * @return The customData. + */ + com.google.protobuf.ByteString getCustomData(); + } + /** + *
+   * Scheduler job data.
+   * 
+ * + * Protobuf type {@code google.events.cloud.scheduler.v1.SchedulerJobData} + */ + public static final class SchedulerJobData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.scheduler.v1.SchedulerJobData) + SchedulerJobDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SchedulerJobData.newBuilder() to construct. + private SchedulerJobData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SchedulerJobData() { + customData_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SchedulerJobData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SchedulerJobData( + 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: { + + customData_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.scheduler.v1.Data.internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.scheduler.v1.Data.internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.scheduler.v1.Data.SchedulerJobData.class, google.events.cloud.scheduler.v1.Data.SchedulerJobData.Builder.class); + } + + public static final int CUSTOM_DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString customData_; + /** + *
+     * The custom data the user specified when creating the scheduler source.
+     * 
+ * + * bytes custom_data = 1; + * @return The customData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomData() { + return customData_; + } + + 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 (!customData_.isEmpty()) { + output.writeBytes(1, customData_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!customData_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, customData_); + } + 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 google.events.cloud.scheduler.v1.Data.SchedulerJobData)) { + return super.equals(obj); + } + google.events.cloud.scheduler.v1.Data.SchedulerJobData other = (google.events.cloud.scheduler.v1.Data.SchedulerJobData) obj; + + if (!getCustomData() + .equals(other.getCustomData())) 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) + CUSTOM_DATA_FIELD_NUMBER; + hash = (53 * hash) + getCustomData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData 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 google.events.cloud.scheduler.v1.Data.SchedulerJobData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData 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 google.events.cloud.scheduler.v1.Data.SchedulerJobData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData 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(google.events.cloud.scheduler.v1.Data.SchedulerJobData 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; + } + /** + *
+     * Scheduler job data.
+     * 
+ * + * Protobuf type {@code google.events.cloud.scheduler.v1.SchedulerJobData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.scheduler.v1.SchedulerJobData) + google.events.cloud.scheduler.v1.Data.SchedulerJobDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.scheduler.v1.Data.internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.scheduler.v1.Data.internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.scheduler.v1.Data.SchedulerJobData.class, google.events.cloud.scheduler.v1.Data.SchedulerJobData.Builder.class); + } + + // Construct using google.events.cloud.scheduler.v1.Data.SchedulerJobData.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(); + customData_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.scheduler.v1.Data.internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_descriptor; + } + + @java.lang.Override + public google.events.cloud.scheduler.v1.Data.SchedulerJobData getDefaultInstanceForType() { + return google.events.cloud.scheduler.v1.Data.SchedulerJobData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.scheduler.v1.Data.SchedulerJobData build() { + google.events.cloud.scheduler.v1.Data.SchedulerJobData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.scheduler.v1.Data.SchedulerJobData buildPartial() { + google.events.cloud.scheduler.v1.Data.SchedulerJobData result = new google.events.cloud.scheduler.v1.Data.SchedulerJobData(this); + result.customData_ = customData_; + 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 google.events.cloud.scheduler.v1.Data.SchedulerJobData) { + return mergeFrom((google.events.cloud.scheduler.v1.Data.SchedulerJobData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.scheduler.v1.Data.SchedulerJobData other) { + if (other == google.events.cloud.scheduler.v1.Data.SchedulerJobData.getDefaultInstance()) return this; + if (other.getCustomData() != com.google.protobuf.ByteString.EMPTY) { + setCustomData(other.getCustomData()); + } + 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 { + google.events.cloud.scheduler.v1.Data.SchedulerJobData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.scheduler.v1.Data.SchedulerJobData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString customData_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The custom data the user specified when creating the scheduler source.
+       * 
+ * + * bytes custom_data = 1; + * @return The customData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomData() { + return customData_; + } + /** + *
+       * The custom data the user specified when creating the scheduler source.
+       * 
+ * + * bytes custom_data = 1; + * @param value The customData to set. + * @return This builder for chaining. + */ + public Builder setCustomData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + customData_ = value; + onChanged(); + return this; + } + /** + *
+       * The custom data the user specified when creating the scheduler source.
+       * 
+ * + * bytes custom_data = 1; + * @return This builder for chaining. + */ + public Builder clearCustomData() { + + customData_ = getDefaultInstance().getCustomData(); + 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:google.events.cloud.scheduler.v1.SchedulerJobData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.scheduler.v1.SchedulerJobData) + private static final google.events.cloud.scheduler.v1.Data.SchedulerJobData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.scheduler.v1.Data.SchedulerJobData(); + } + + public static google.events.cloud.scheduler.v1.Data.SchedulerJobData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulerJobData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SchedulerJobData(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 google.events.cloud.scheduler.v1.Data.SchedulerJobData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_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+google/events/cloud/scheduler/v1/data." + + "proto\022 google.events.cloud.scheduler.v1\"" + + "\'\n\020SchedulerJobData\022\023\n\013custom_data\030\001 \001(\014" + + "B,\252\002)Google.Events.Protobuf.Cloud.Schedu" + + "ler.V1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_scheduler_v1_SchedulerJobData_descriptor, + new java.lang.String[] { "CustomData", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/google/events/cloud/storage/v1/Data.java b/src/google/events/cloud/storage/v1/Data.java new file mode 100644 index 00000000..da0ec48b --- /dev/null +++ b/src/google/events/cloud/storage/v1/Data.java @@ -0,0 +1,6868 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/storage/v1/data.proto + +package google.events.cloud.storage.v1; + +public final class Data { + private Data() {} + 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 StorageObjectDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.storage.v1.StorageObjectData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Content-Encoding of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+     * 
+ * + * string content_encoding = 1; + * @return The contentEncoding. + */ + java.lang.String getContentEncoding(); + /** + *
+     * Content-Encoding of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+     * 
+ * + * string content_encoding = 1; + * @return The bytes for contentEncoding. + */ + com.google.protobuf.ByteString + getContentEncodingBytes(); + + /** + *
+     * Content-Disposition of the object data, matching
+     * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+     * 
+ * + * string content_disposition = 2; + * @return The contentDisposition. + */ + java.lang.String getContentDisposition(); + /** + *
+     * Content-Disposition of the object data, matching
+     * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+     * 
+ * + * string content_disposition = 2; + * @return The bytes for contentDisposition. + */ + com.google.protobuf.ByteString + getContentDispositionBytes(); + + /** + *
+     * Cache-Control directive for the object data, matching
+     * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+     * 
+ * + * string cache_control = 3; + * @return The cacheControl. + */ + java.lang.String getCacheControl(); + /** + *
+     * Cache-Control directive for the object data, matching
+     * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+     * 
+ * + * string cache_control = 3; + * @return The bytes for cacheControl. + */ + com.google.protobuf.ByteString + getCacheControlBytes(); + + /** + *
+     * Content-Language of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+     * 
+ * + * string content_language = 5; + * @return The contentLanguage. + */ + java.lang.String getContentLanguage(); + /** + *
+     * Content-Language of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+     * 
+ * + * string content_language = 5; + * @return The bytes for contentLanguage. + */ + com.google.protobuf.ByteString + getContentLanguageBytes(); + + /** + *
+     * The version of the metadata for this object at this generation. Used for
+     * preconditions and for detecting changes in metadata. A metageneration
+     * number is only meaningful in the context of a particular generation of a
+     * particular object.
+     * 
+ * + * int64 metageneration = 6; + * @return The metageneration. + */ + long getMetageneration(); + + /** + *
+     * The deletion time of the object. Will be returned if and only if this
+     * version of the object has been deleted.
+     * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + * @return Whether the timeDeleted field is set. + */ + boolean hasTimeDeleted(); + /** + *
+     * The deletion time of the object. Will be returned if and only if this
+     * version of the object has been deleted.
+     * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + * @return The timeDeleted. + */ + com.google.protobuf.Timestamp getTimeDeleted(); + /** + *
+     * The deletion time of the object. Will be returned if and only if this
+     * version of the object has been deleted.
+     * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + com.google.protobuf.TimestampOrBuilder getTimeDeletedOrBuilder(); + + /** + *
+     * Content-Type of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+     * If an object is stored without a Content-Type, it is served as
+     * `application/octet-stream`.
+     * 
+ * + * string content_type = 8; + * @return The contentType. + */ + java.lang.String getContentType(); + /** + *
+     * Content-Type of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+     * If an object is stored without a Content-Type, it is served as
+     * `application/octet-stream`.
+     * 
+ * + * string content_type = 8; + * @return The bytes for contentType. + */ + com.google.protobuf.ByteString + getContentTypeBytes(); + + /** + *
+     * Content-Length of the object data in bytes, matching
+     * [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
+     * 
+ * + * int64 size = 9; + * @return The size. + */ + long getSize(); + + /** + *
+     * The creation time of the object.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * .google.protobuf.Timestamp time_created = 10; + * @return Whether the timeCreated field is set. + */ + boolean hasTimeCreated(); + /** + *
+     * The creation time of the object.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * .google.protobuf.Timestamp time_created = 10; + * @return The timeCreated. + */ + com.google.protobuf.Timestamp getTimeCreated(); + /** + *
+     * The creation time of the object.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + com.google.protobuf.TimestampOrBuilder getTimeCreatedOrBuilder(); + + /** + *
+     * CRC32c checksum. For more information about using the CRC32c
+     * checksum, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string crc32c = 11; + * @return The crc32c. + */ + java.lang.String getCrc32C(); + /** + *
+     * CRC32c checksum. For more information about using the CRC32c
+     * checksum, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string crc32c = 11; + * @return The bytes for crc32c. + */ + com.google.protobuf.ByteString + getCrc32CBytes(); + + /** + *
+     * Number of underlying components that make up this object. Components are
+     * accumulated by compose operations.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * int32 component_count = 12; + * @return The componentCount. + */ + int getComponentCount(); + + /** + *
+     * MD5 hash of the data; encoded using base64 as per
+     * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+     * information about using the MD5 hash, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string md5_hash = 13; + * @return The md5Hash. + */ + java.lang.String getMd5Hash(); + /** + *
+     * MD5 hash of the data; encoded using base64 as per
+     * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+     * information about using the MD5 hash, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string md5_hash = 13; + * @return The bytes for md5Hash. + */ + com.google.protobuf.ByteString + getMd5HashBytes(); + + /** + *
+     * HTTP 1.1 Entity tag for the object. See
+     * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+     * 
+ * + * string etag = 14; + * @return The etag. + */ + java.lang.String getEtag(); + /** + *
+     * HTTP 1.1 Entity tag for the object. See
+     * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+     * 
+ * + * string etag = 14; + * @return The bytes for etag. + */ + com.google.protobuf.ByteString + getEtagBytes(); + + /** + *
+     * The modification time of the object metadata.
+     * 
+ * + * .google.protobuf.Timestamp updated = 15; + * @return Whether the updated field is set. + */ + boolean hasUpdated(); + /** + *
+     * The modification time of the object metadata.
+     * 
+ * + * .google.protobuf.Timestamp updated = 15; + * @return The updated. + */ + com.google.protobuf.Timestamp getUpdated(); + /** + *
+     * The modification time of the object metadata.
+     * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder(); + + /** + *
+     * Storage class of the object.
+     * 
+ * + * string storage_class = 16; + * @return The storageClass. + */ + java.lang.String getStorageClass(); + /** + *
+     * Storage class of the object.
+     * 
+ * + * string storage_class = 16; + * @return The bytes for storageClass. + */ + com.google.protobuf.ByteString + getStorageClassBytes(); + + /** + *
+     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+     * such a key.
+     * 
+ * + * string kms_key_name = 17; + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + *
+     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+     * such a key.
+     * 
+ * + * string kms_key_name = 17; + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString + getKmsKeyNameBytes(); + + /** + *
+     * The time at which the object's storage class was last changed.
+     * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + * @return Whether the timeStorageClassUpdated field is set. + */ + boolean hasTimeStorageClassUpdated(); + /** + *
+     * The time at which the object's storage class was last changed.
+     * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + * @return The timeStorageClassUpdated. + */ + com.google.protobuf.Timestamp getTimeStorageClassUpdated(); + /** + *
+     * The time at which the object's storage class was last changed.
+     * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + com.google.protobuf.TimestampOrBuilder getTimeStorageClassUpdatedOrBuilder(); + + /** + *
+     * Whether an object is under temporary hold.
+     * 
+ * + * bool temporary_hold = 19; + * @return The temporaryHold. + */ + boolean getTemporaryHold(); + + /** + *
+     * A server-determined value that specifies the earliest time that the
+     * object's retention period expires.
+     * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + * @return Whether the retentionExpirationTime field is set. + */ + boolean hasRetentionExpirationTime(); + /** + *
+     * A server-determined value that specifies the earliest time that the
+     * object's retention period expires.
+     * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + * @return The retentionExpirationTime. + */ + com.google.protobuf.Timestamp getRetentionExpirationTime(); + /** + *
+     * A server-determined value that specifies the earliest time that the
+     * object's retention period expires.
+     * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + com.google.protobuf.TimestampOrBuilder getRetentionExpirationTimeOrBuilder(); + + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + int getMetadataCount(); + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + boolean containsMetadata( + java.lang.String key); + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetadata(); + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + java.util.Map + getMetadataMap(); + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + + java.lang.String getMetadataOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + + java.lang.String getMetadataOrThrow( + java.lang.String key); + + /** + *
+     * Whether an object is under event-based hold.
+     * 
+ * + * bool event_based_hold = 29; + * @return The eventBasedHold. + */ + boolean getEventBasedHold(); + + /** + *
+     * The name of the object.
+     * 
+ * + * string name = 23; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The name of the object.
+     * 
+ * + * string name = 23; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The ID of the object, including the bucket name, object name, and
+     * generation number.
+     * 
+ * + * string id = 24; + * @return The id. + */ + java.lang.String getId(); + /** + *
+     * The ID of the object, including the bucket name, object name, and
+     * generation number.
+     * 
+ * + * string id = 24; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+     * The name of the bucket containing this object.
+     * 
+ * + * string bucket = 25; + * @return The bucket. + */ + java.lang.String getBucket(); + /** + *
+     * The name of the bucket containing this object.
+     * 
+ * + * string bucket = 25; + * @return The bytes for bucket. + */ + com.google.protobuf.ByteString + getBucketBytes(); + + /** + *
+     * The content generation of this object. Used for object versioning.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * int64 generation = 26; + * @return The generation. + */ + long getGeneration(); + + /** + *
+     * Metadata of customer-supplied encryption key, if the object is encrypted by
+     * such a key.
+     * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + * @return Whether the customerEncryption field is set. + */ + boolean hasCustomerEncryption(); + /** + *
+     * Metadata of customer-supplied encryption key, if the object is encrypted by
+     * such a key.
+     * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + * @return The customerEncryption. + */ + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption getCustomerEncryption(); + /** + *
+     * Metadata of customer-supplied encryption key, if the object is encrypted by
+     * such a key.
+     * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder(); + + /** + *
+     * The link to this object.
+     * 
+ * + * string media_link = 100; + * @return The mediaLink. + */ + java.lang.String getMediaLink(); + /** + *
+     * The link to this object.
+     * 
+ * + * string media_link = 100; + * @return The bytes for mediaLink. + */ + com.google.protobuf.ByteString + getMediaLinkBytes(); + + /** + *
+     * Media download link.
+     * 
+ * + * string self_link = 101; + * @return The selfLink. + */ + java.lang.String getSelfLink(); + /** + *
+     * Media download link.
+     * 
+ * + * string self_link = 101; + * @return The bytes for selfLink. + */ + com.google.protobuf.ByteString + getSelfLinkBytes(); + } + /** + *
+   * An object within Google Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.events.cloud.storage.v1.StorageObjectData} + */ + public static final class StorageObjectData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.storage.v1.StorageObjectData) + StorageObjectDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use StorageObjectData.newBuilder() to construct. + private StorageObjectData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StorageObjectData() { + contentEncoding_ = ""; + contentDisposition_ = ""; + cacheControl_ = ""; + contentLanguage_ = ""; + contentType_ = ""; + crc32C_ = ""; + md5Hash_ = ""; + etag_ = ""; + storageClass_ = ""; + kmsKeyName_ = ""; + name_ = ""; + id_ = ""; + bucket_ = ""; + mediaLink_ = ""; + selfLink_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StorageObjectData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StorageObjectData( + 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(); + + contentEncoding_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + contentDisposition_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + cacheControl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + contentLanguage_ = s; + break; + } + case 48: { + + metageneration_ = input.readInt64(); + break; + } + case 58: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timeDeleted_ != null) { + subBuilder = timeDeleted_.toBuilder(); + } + timeDeleted_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeDeleted_); + timeDeleted_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + contentType_ = s; + break; + } + case 72: { + + size_ = input.readInt64(); + break; + } + case 82: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timeCreated_ != null) { + subBuilder = timeCreated_.toBuilder(); + } + timeCreated_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeCreated_); + timeCreated_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + crc32C_ = s; + break; + } + case 96: { + + componentCount_ = input.readInt32(); + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + + md5Hash_ = s; + break; + } + case 114: { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 122: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updated_ != null) { + subBuilder = updated_.toBuilder(); + } + updated_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updated_); + updated_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + java.lang.String s = input.readStringRequireUtf8(); + + storageClass_ = s; + break; + } + case 138: { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKeyName_ = s; + break; + } + case 146: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timeStorageClassUpdated_ != null) { + subBuilder = timeStorageClassUpdated_.toBuilder(); + } + timeStorageClassUpdated_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeStorageClassUpdated_); + timeStorageClassUpdated_ = subBuilder.buildPartial(); + } + + break; + } + case 152: { + + temporaryHold_ = input.readBool(); + break; + } + case 162: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (retentionExpirationTime_ != null) { + subBuilder = retentionExpirationTime_.toBuilder(); + } + retentionExpirationTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(retentionExpirationTime_); + retentionExpirationTime_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + metadata_.getMutableMap().put( + metadata__.getKey(), metadata__.getValue()); + break; + } + case 186: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 194: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 202: { + java.lang.String s = input.readStringRequireUtf8(); + + bucket_ = s; + break; + } + case 208: { + + generation_ = input.readInt64(); + break; + } + case 226: { + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder subBuilder = null; + if (customerEncryption_ != null) { + subBuilder = customerEncryption_.toBuilder(); + } + customerEncryption_ = input.readMessage(google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customerEncryption_); + customerEncryption_ = subBuilder.buildPartial(); + } + + break; + } + case 232: { + + eventBasedHold_ = input.readBool(); + break; + } + case 802: { + java.lang.String s = input.readStringRequireUtf8(); + + mediaLink_ = s; + break; + } + case 810: { + java.lang.String s = input.readStringRequireUtf8(); + + selfLink_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 21: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.storage.v1.Data.StorageObjectData.class, google.events.cloud.storage.v1.Data.StorageObjectData.Builder.class); + } + + public interface CustomerEncryptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The encryption algorithm.
+       * 
+ * + * string encryption_algorithm = 1; + * @return The encryptionAlgorithm. + */ + java.lang.String getEncryptionAlgorithm(); + /** + *
+       * The encryption algorithm.
+       * 
+ * + * string encryption_algorithm = 1; + * @return The bytes for encryptionAlgorithm. + */ + com.google.protobuf.ByteString + getEncryptionAlgorithmBytes(); + + /** + *
+       * SHA256 hash value of the encryption key.
+       * 
+ * + * string key_sha256 = 2; + * @return The keySha256. + */ + java.lang.String getKeySha256(); + /** + *
+       * SHA256 hash value of the encryption key.
+       * 
+ * + * string key_sha256 = 2; + * @return The bytes for keySha256. + */ + com.google.protobuf.ByteString + getKeySha256Bytes(); + } + /** + *
+     * Describes the customer-specified mechanism used to store the data at rest.
+     * 
+ * + * Protobuf type {@code google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption} + */ + public static final class CustomerEncryption extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption) + CustomerEncryptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomerEncryption.newBuilder() to construct. + private CustomerEncryption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CustomerEncryption() { + encryptionAlgorithm_ = ""; + keySha256_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CustomerEncryption(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CustomerEncryption( + 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(); + + encryptionAlgorithm_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + keySha256_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.class, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder.class); + } + + public static final int ENCRYPTION_ALGORITHM_FIELD_NUMBER = 1; + private volatile java.lang.Object encryptionAlgorithm_; + /** + *
+       * The encryption algorithm.
+       * 
+ * + * string encryption_algorithm = 1; + * @return The encryptionAlgorithm. + */ + @java.lang.Override + public java.lang.String getEncryptionAlgorithm() { + java.lang.Object ref = encryptionAlgorithm_; + 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(); + encryptionAlgorithm_ = s; + return s; + } + } + /** + *
+       * The encryption algorithm.
+       * 
+ * + * string encryption_algorithm = 1; + * @return The bytes for encryptionAlgorithm. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEncryptionAlgorithmBytes() { + java.lang.Object ref = encryptionAlgorithm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encryptionAlgorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_SHA256_FIELD_NUMBER = 2; + private volatile java.lang.Object keySha256_; + /** + *
+       * SHA256 hash value of the encryption key.
+       * 
+ * + * string key_sha256 = 2; + * @return The keySha256. + */ + @java.lang.Override + public java.lang.String getKeySha256() { + java.lang.Object ref = keySha256_; + 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(); + keySha256_ = s; + return s; + } + } + /** + *
+       * SHA256 hash value of the encryption key.
+       * 
+ * + * string key_sha256 = 2; + * @return The bytes for keySha256. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeySha256Bytes() { + java.lang.Object ref = keySha256_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keySha256_ = 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 (!getEncryptionAlgorithmBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, encryptionAlgorithm_); + } + if (!getKeySha256Bytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keySha256_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEncryptionAlgorithmBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, encryptionAlgorithm_); + } + if (!getKeySha256Bytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keySha256_); + } + 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 google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption)) { + return super.equals(obj); + } + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption other = (google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption) obj; + + if (!getEncryptionAlgorithm() + .equals(other.getEncryptionAlgorithm())) return false; + if (!getKeySha256() + .equals(other.getKeySha256())) 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) + ENCRYPTION_ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionAlgorithm().hashCode(); + hash = (37 * hash) + KEY_SHA256_FIELD_NUMBER; + hash = (53 * hash) + getKeySha256().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption 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 google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption 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 google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption 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(google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption 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; + } + /** + *
+       * Describes the customer-specified mechanism used to store the data at rest.
+       * 
+ * + * Protobuf type {@code google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption) + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.class, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder.class); + } + + // Construct using google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.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(); + encryptionAlgorithm_ = ""; + + keySha256_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_descriptor; + } + + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption getDefaultInstanceForType() { + return google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption build() { + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption buildPartial() { + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption result = new google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption(this); + result.encryptionAlgorithm_ = encryptionAlgorithm_; + result.keySha256_ = keySha256_; + 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 google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption) { + return mergeFrom((google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption other) { + if (other == google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.getDefaultInstance()) return this; + if (!other.getEncryptionAlgorithm().isEmpty()) { + encryptionAlgorithm_ = other.encryptionAlgorithm_; + onChanged(); + } + if (!other.getKeySha256().isEmpty()) { + keySha256_ = other.keySha256_; + 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 { + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object encryptionAlgorithm_ = ""; + /** + *
+         * The encryption algorithm.
+         * 
+ * + * string encryption_algorithm = 1; + * @return The encryptionAlgorithm. + */ + public java.lang.String getEncryptionAlgorithm() { + java.lang.Object ref = encryptionAlgorithm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encryptionAlgorithm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The encryption algorithm.
+         * 
+ * + * string encryption_algorithm = 1; + * @return The bytes for encryptionAlgorithm. + */ + public com.google.protobuf.ByteString + getEncryptionAlgorithmBytes() { + java.lang.Object ref = encryptionAlgorithm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encryptionAlgorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The encryption algorithm.
+         * 
+ * + * string encryption_algorithm = 1; + * @param value The encryptionAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setEncryptionAlgorithm( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + encryptionAlgorithm_ = value; + onChanged(); + return this; + } + /** + *
+         * The encryption algorithm.
+         * 
+ * + * string encryption_algorithm = 1; + * @return This builder for chaining. + */ + public Builder clearEncryptionAlgorithm() { + + encryptionAlgorithm_ = getDefaultInstance().getEncryptionAlgorithm(); + onChanged(); + return this; + } + /** + *
+         * The encryption algorithm.
+         * 
+ * + * string encryption_algorithm = 1; + * @param value The bytes for encryptionAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setEncryptionAlgorithmBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + encryptionAlgorithm_ = value; + onChanged(); + return this; + } + + private java.lang.Object keySha256_ = ""; + /** + *
+         * SHA256 hash value of the encryption key.
+         * 
+ * + * string key_sha256 = 2; + * @return The keySha256. + */ + public java.lang.String getKeySha256() { + java.lang.Object ref = keySha256_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keySha256_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * SHA256 hash value of the encryption key.
+         * 
+ * + * string key_sha256 = 2; + * @return The bytes for keySha256. + */ + public com.google.protobuf.ByteString + getKeySha256Bytes() { + java.lang.Object ref = keySha256_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keySha256_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * SHA256 hash value of the encryption key.
+         * 
+ * + * string key_sha256 = 2; + * @param value The keySha256 to set. + * @return This builder for chaining. + */ + public Builder setKeySha256( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keySha256_ = value; + onChanged(); + return this; + } + /** + *
+         * SHA256 hash value of the encryption key.
+         * 
+ * + * string key_sha256 = 2; + * @return This builder for chaining. + */ + public Builder clearKeySha256() { + + keySha256_ = getDefaultInstance().getKeySha256(); + onChanged(); + return this; + } + /** + *
+         * SHA256 hash value of the encryption key.
+         * 
+ * + * string key_sha256 = 2; + * @param value The bytes for keySha256 to set. + * @return This builder for chaining. + */ + public Builder setKeySha256Bytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keySha256_ = 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:google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption) + private static final google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption(); + } + + public static google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerEncryption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomerEncryption(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 google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CONTENT_ENCODING_FIELD_NUMBER = 1; + private volatile java.lang.Object contentEncoding_; + /** + *
+     * Content-Encoding of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+     * 
+ * + * string content_encoding = 1; + * @return The contentEncoding. + */ + @java.lang.Override + public java.lang.String getContentEncoding() { + java.lang.Object ref = contentEncoding_; + 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(); + contentEncoding_ = s; + return s; + } + } + /** + *
+     * Content-Encoding of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+     * 
+ * + * string content_encoding = 1; + * @return The bytes for contentEncoding. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentEncodingBytes() { + java.lang.Object ref = contentEncoding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_DISPOSITION_FIELD_NUMBER = 2; + private volatile java.lang.Object contentDisposition_; + /** + *
+     * Content-Disposition of the object data, matching
+     * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+     * 
+ * + * string content_disposition = 2; + * @return The contentDisposition. + */ + @java.lang.Override + public java.lang.String getContentDisposition() { + java.lang.Object ref = contentDisposition_; + 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(); + contentDisposition_ = s; + return s; + } + } + /** + *
+     * Content-Disposition of the object data, matching
+     * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+     * 
+ * + * string content_disposition = 2; + * @return The bytes for contentDisposition. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentDispositionBytes() { + java.lang.Object ref = contentDisposition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CACHE_CONTROL_FIELD_NUMBER = 3; + private volatile java.lang.Object cacheControl_; + /** + *
+     * Cache-Control directive for the object data, matching
+     * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+     * 
+ * + * string cache_control = 3; + * @return The cacheControl. + */ + @java.lang.Override + public java.lang.String getCacheControl() { + java.lang.Object ref = cacheControl_; + 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(); + cacheControl_ = s; + return s; + } + } + /** + *
+     * Cache-Control directive for the object data, matching
+     * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+     * 
+ * + * string cache_control = 3; + * @return The bytes for cacheControl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCacheControlBytes() { + java.lang.Object ref = cacheControl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheControl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_LANGUAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object contentLanguage_; + /** + *
+     * Content-Language of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+     * 
+ * + * string content_language = 5; + * @return The contentLanguage. + */ + @java.lang.Override + public java.lang.String getContentLanguage() { + java.lang.Object ref = contentLanguage_; + 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(); + contentLanguage_ = s; + return s; + } + } + /** + *
+     * Content-Language of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+     * 
+ * + * string content_language = 5; + * @return The bytes for contentLanguage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentLanguageBytes() { + java.lang.Object ref = contentLanguage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentLanguage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METAGENERATION_FIELD_NUMBER = 6; + private long metageneration_; + /** + *
+     * The version of the metadata for this object at this generation. Used for
+     * preconditions and for detecting changes in metadata. A metageneration
+     * number is only meaningful in the context of a particular generation of a
+     * particular object.
+     * 
+ * + * int64 metageneration = 6; + * @return The metageneration. + */ + @java.lang.Override + public long getMetageneration() { + return metageneration_; + } + + public static final int TIME_DELETED_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp timeDeleted_; + /** + *
+     * The deletion time of the object. Will be returned if and only if this
+     * version of the object has been deleted.
+     * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + * @return Whether the timeDeleted field is set. + */ + @java.lang.Override + public boolean hasTimeDeleted() { + return timeDeleted_ != null; + } + /** + *
+     * The deletion time of the object. Will be returned if and only if this
+     * version of the object has been deleted.
+     * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + * @return The timeDeleted. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimeDeleted() { + return timeDeleted_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timeDeleted_; + } + /** + *
+     * The deletion time of the object. Will be returned if and only if this
+     * version of the object has been deleted.
+     * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimeDeletedOrBuilder() { + return getTimeDeleted(); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 8; + private volatile java.lang.Object contentType_; + /** + *
+     * Content-Type of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+     * If an object is stored without a Content-Type, it is served as
+     * `application/octet-stream`.
+     * 
+ * + * string content_type = 8; + * @return The contentType. + */ + @java.lang.Override + public java.lang.String getContentType() { + java.lang.Object ref = contentType_; + 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(); + contentType_ = s; + return s; + } + } + /** + *
+     * Content-Type of the object data, matching
+     * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+     * If an object is stored without a Content-Type, it is served as
+     * `application/octet-stream`.
+     * 
+ * + * string content_type = 8; + * @return The bytes for contentType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentTypeBytes() { + java.lang.Object ref = contentType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 9; + private long size_; + /** + *
+     * Content-Length of the object data in bytes, matching
+     * [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
+     * 
+ * + * int64 size = 9; + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + + public static final int TIME_CREATED_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp timeCreated_; + /** + *
+     * The creation time of the object.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * .google.protobuf.Timestamp time_created = 10; + * @return Whether the timeCreated field is set. + */ + @java.lang.Override + public boolean hasTimeCreated() { + return timeCreated_ != null; + } + /** + *
+     * The creation time of the object.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * .google.protobuf.Timestamp time_created = 10; + * @return The timeCreated. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimeCreated() { + return timeCreated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timeCreated_; + } + /** + *
+     * The creation time of the object.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimeCreatedOrBuilder() { + return getTimeCreated(); + } + + public static final int CRC32C_FIELD_NUMBER = 11; + private volatile java.lang.Object crc32C_; + /** + *
+     * CRC32c checksum. For more information about using the CRC32c
+     * checksum, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string crc32c = 11; + * @return The crc32c. + */ + @java.lang.Override + public java.lang.String getCrc32C() { + java.lang.Object ref = crc32C_; + 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(); + crc32C_ = s; + return s; + } + } + /** + *
+     * CRC32c checksum. For more information about using the CRC32c
+     * checksum, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string crc32c = 11; + * @return The bytes for crc32c. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCrc32CBytes() { + java.lang.Object ref = crc32C_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + crc32C_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPONENT_COUNT_FIELD_NUMBER = 12; + private int componentCount_; + /** + *
+     * Number of underlying components that make up this object. Components are
+     * accumulated by compose operations.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * int32 component_count = 12; + * @return The componentCount. + */ + @java.lang.Override + public int getComponentCount() { + return componentCount_; + } + + public static final int MD5_HASH_FIELD_NUMBER = 13; + private volatile java.lang.Object md5Hash_; + /** + *
+     * MD5 hash of the data; encoded using base64 as per
+     * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+     * information about using the MD5 hash, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string md5_hash = 13; + * @return The md5Hash. + */ + @java.lang.Override + public java.lang.String getMd5Hash() { + java.lang.Object ref = md5Hash_; + 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(); + md5Hash_ = s; + return s; + } + } + /** + *
+     * MD5 hash of the data; encoded using base64 as per
+     * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+     * information about using the MD5 hash, see
+     * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+     * ETags: Best Practices].
+     * 
+ * + * string md5_hash = 13; + * @return The bytes for md5Hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMd5HashBytes() { + java.lang.Object ref = md5Hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + md5Hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 14; + private volatile java.lang.Object etag_; + /** + *
+     * HTTP 1.1 Entity tag for the object. See
+     * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+     * 
+ * + * string etag = 14; + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + *
+     * HTTP 1.1 Entity tag for the object. See
+     * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+     * 
+ * + * string etag = 14; + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATED_FIELD_NUMBER = 15; + private com.google.protobuf.Timestamp updated_; + /** + *
+     * The modification time of the object metadata.
+     * 
+ * + * .google.protobuf.Timestamp updated = 15; + * @return Whether the updated field is set. + */ + @java.lang.Override + public boolean hasUpdated() { + return updated_ != null; + } + /** + *
+     * The modification time of the object metadata.
+     * 
+ * + * .google.protobuf.Timestamp updated = 15; + * @return The updated. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdated() { + return updated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updated_; + } + /** + *
+     * The modification time of the object metadata.
+     * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder() { + return getUpdated(); + } + + public static final int STORAGE_CLASS_FIELD_NUMBER = 16; + private volatile java.lang.Object storageClass_; + /** + *
+     * Storage class of the object.
+     * 
+ * + * string storage_class = 16; + * @return The storageClass. + */ + @java.lang.Override + public java.lang.String getStorageClass() { + java.lang.Object ref = storageClass_; + 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(); + storageClass_ = s; + return s; + } + } + /** + *
+     * Storage class of the object.
+     * 
+ * + * string storage_class = 16; + * @return The bytes for storageClass. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStorageClassBytes() { + java.lang.Object ref = storageClass_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + storageClass_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 17; + private volatile java.lang.Object kmsKeyName_; + /** + *
+     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+     * such a key.
+     * 
+ * + * string kms_key_name = 17; + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + /** + *
+     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+     * such a key.
+     * 
+ * + * string kms_key_name = 17; + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_STORAGE_CLASS_UPDATED_FIELD_NUMBER = 18; + private com.google.protobuf.Timestamp timeStorageClassUpdated_; + /** + *
+     * The time at which the object's storage class was last changed.
+     * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + * @return Whether the timeStorageClassUpdated field is set. + */ + @java.lang.Override + public boolean hasTimeStorageClassUpdated() { + return timeStorageClassUpdated_ != null; + } + /** + *
+     * The time at which the object's storage class was last changed.
+     * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + * @return The timeStorageClassUpdated. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimeStorageClassUpdated() { + return timeStorageClassUpdated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timeStorageClassUpdated_; + } + /** + *
+     * The time at which the object's storage class was last changed.
+     * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimeStorageClassUpdatedOrBuilder() { + return getTimeStorageClassUpdated(); + } + + public static final int TEMPORARY_HOLD_FIELD_NUMBER = 19; + private boolean temporaryHold_; + /** + *
+     * Whether an object is under temporary hold.
+     * 
+ * + * bool temporary_hold = 19; + * @return The temporaryHold. + */ + @java.lang.Override + public boolean getTemporaryHold() { + return temporaryHold_; + } + + public static final int RETENTION_EXPIRATION_TIME_FIELD_NUMBER = 20; + private com.google.protobuf.Timestamp retentionExpirationTime_; + /** + *
+     * A server-determined value that specifies the earliest time that the
+     * object's retention period expires.
+     * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + * @return Whether the retentionExpirationTime field is set. + */ + @java.lang.Override + public boolean hasRetentionExpirationTime() { + return retentionExpirationTime_ != null; + } + /** + *
+     * A server-determined value that specifies the earliest time that the
+     * object's retention period expires.
+     * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + * @return The retentionExpirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRetentionExpirationTime() { + return retentionExpirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : retentionExpirationTime_; + } + /** + *
+     * A server-determined value that specifies the earliest time that the
+     * object's retention period expires.
+     * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRetentionExpirationTimeOrBuilder() { + return getRetentionExpirationTime(); + } + + public static final int METADATA_FIELD_NUMBER = 21; + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + @java.lang.Override + + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + @java.lang.Override + + public java.lang.String getMetadataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-provided metadata, in key/value pairs.
+     * 
+ * + * map<string, string> metadata = 21; + */ + @java.lang.Override + + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EVENT_BASED_HOLD_FIELD_NUMBER = 29; + private boolean eventBasedHold_; + /** + *
+     * Whether an object is under event-based hold.
+     * 
+ * + * bool event_based_hold = 29; + * @return The eventBasedHold. + */ + @java.lang.Override + public boolean getEventBasedHold() { + return eventBasedHold_; + } + + public static final int NAME_FIELD_NUMBER = 23; + private volatile java.lang.Object name_; + /** + *
+     * The name of the object.
+     * 
+ * + * string name = 23; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
+     * The name of the object.
+     * 
+ * + * string name = 23; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 24; + private volatile java.lang.Object id_; + /** + *
+     * The ID of the object, including the bucket name, object name, and
+     * generation number.
+     * 
+ * + * string id = 24; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + *
+     * The ID of the object, including the bucket name, object name, and
+     * generation number.
+     * 
+ * + * string id = 24; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUCKET_FIELD_NUMBER = 25; + private volatile java.lang.Object bucket_; + /** + *
+     * The name of the bucket containing this object.
+     * 
+ * + * string bucket = 25; + * @return The bucket. + */ + @java.lang.Override + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + 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(); + bucket_ = s; + return s; + } + } + /** + *
+     * The name of the bucket containing this object.
+     * 
+ * + * string bucket = 25; + * @return The bytes for bucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATION_FIELD_NUMBER = 26; + private long generation_; + /** + *
+     * The content generation of this object. Used for object versioning.
+     * Attempting to set this field will result in an error.
+     * 
+ * + * int64 generation = 26; + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + + public static final int CUSTOMER_ENCRYPTION_FIELD_NUMBER = 28; + private google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption customerEncryption_; + /** + *
+     * Metadata of customer-supplied encryption key, if the object is encrypted by
+     * such a key.
+     * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + * @return Whether the customerEncryption field is set. + */ + @java.lang.Override + public boolean hasCustomerEncryption() { + return customerEncryption_ != null; + } + /** + *
+     * Metadata of customer-supplied encryption key, if the object is encrypted by
+     * such a key.
+     * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + * @return The customerEncryption. + */ + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption getCustomerEncryption() { + return customerEncryption_ == null ? google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.getDefaultInstance() : customerEncryption_; + } + /** + *
+     * Metadata of customer-supplied encryption key, if the object is encrypted by
+     * such a key.
+     * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder() { + return getCustomerEncryption(); + } + + public static final int MEDIA_LINK_FIELD_NUMBER = 100; + private volatile java.lang.Object mediaLink_; + /** + *
+     * The link to this object.
+     * 
+ * + * string media_link = 100; + * @return The mediaLink. + */ + @java.lang.Override + public java.lang.String getMediaLink() { + java.lang.Object ref = mediaLink_; + 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(); + mediaLink_ = s; + return s; + } + } + /** + *
+     * The link to this object.
+     * 
+ * + * string media_link = 100; + * @return The bytes for mediaLink. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMediaLinkBytes() { + java.lang.Object ref = mediaLink_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mediaLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SELF_LINK_FIELD_NUMBER = 101; + private volatile java.lang.Object selfLink_; + /** + *
+     * Media download link.
+     * 
+ * + * string self_link = 101; + * @return The selfLink. + */ + @java.lang.Override + public java.lang.String getSelfLink() { + java.lang.Object ref = selfLink_; + 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(); + selfLink_ = s; + return s; + } + } + /** + *
+     * Media download link.
+     * 
+ * + * string self_link = 101; + * @return The bytes for selfLink. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSelfLinkBytes() { + java.lang.Object ref = selfLink_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selfLink_ = 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 (!getContentEncodingBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contentEncoding_); + } + if (!getContentDispositionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, contentDisposition_); + } + if (!getCacheControlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, cacheControl_); + } + if (!getContentLanguageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, contentLanguage_); + } + if (metageneration_ != 0L) { + output.writeInt64(6, metageneration_); + } + if (timeDeleted_ != null) { + output.writeMessage(7, getTimeDeleted()); + } + if (!getContentTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, contentType_); + } + if (size_ != 0L) { + output.writeInt64(9, size_); + } + if (timeCreated_ != null) { + output.writeMessage(10, getTimeCreated()); + } + if (!getCrc32CBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, crc32C_); + } + if (componentCount_ != 0) { + output.writeInt32(12, componentCount_); + } + if (!getMd5HashBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, md5Hash_); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, etag_); + } + if (updated_ != null) { + output.writeMessage(15, getUpdated()); + } + if (!getStorageClassBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, storageClass_); + } + if (!getKmsKeyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, kmsKeyName_); + } + if (timeStorageClassUpdated_ != null) { + output.writeMessage(18, getTimeStorageClassUpdated()); + } + if (temporaryHold_ != false) { + output.writeBool(19, temporaryHold_); + } + if (retentionExpirationTime_ != null) { + output.writeMessage(20, getRetentionExpirationTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 21); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, name_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, id_); + } + if (!getBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, bucket_); + } + if (generation_ != 0L) { + output.writeInt64(26, generation_); + } + if (customerEncryption_ != null) { + output.writeMessage(28, getCustomerEncryption()); + } + if (eventBasedHold_ != false) { + output.writeBool(29, eventBasedHold_); + } + if (!getMediaLinkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 100, mediaLink_); + } + if (!getSelfLinkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 101, selfLink_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getContentEncodingBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contentEncoding_); + } + if (!getContentDispositionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, contentDisposition_); + } + if (!getCacheControlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, cacheControl_); + } + if (!getContentLanguageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, contentLanguage_); + } + if (metageneration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, metageneration_); + } + if (timeDeleted_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getTimeDeleted()); + } + if (!getContentTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, contentType_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, size_); + } + if (timeCreated_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getTimeCreated()); + } + if (!getCrc32CBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, crc32C_); + } + if (componentCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(12, componentCount_); + } + if (!getMd5HashBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, md5Hash_); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, etag_); + } + if (updated_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getUpdated()); + } + if (!getStorageClassBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, storageClass_); + } + if (!getKmsKeyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, kmsKeyName_); + } + if (timeStorageClassUpdated_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getTimeStorageClassUpdated()); + } + if (temporaryHold_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, temporaryHold_); + } + if (retentionExpirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getRetentionExpirationTime()); + } + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, metadata__); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, name_); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, id_); + } + if (!getBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, bucket_); + } + if (generation_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(26, generation_); + } + if (customerEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, getCustomerEncryption()); + } + if (eventBasedHold_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(29, eventBasedHold_); + } + if (!getMediaLinkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, mediaLink_); + } + if (!getSelfLinkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(101, selfLink_); + } + 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 google.events.cloud.storage.v1.Data.StorageObjectData)) { + return super.equals(obj); + } + google.events.cloud.storage.v1.Data.StorageObjectData other = (google.events.cloud.storage.v1.Data.StorageObjectData) obj; + + if (!getContentEncoding() + .equals(other.getContentEncoding())) return false; + if (!getContentDisposition() + .equals(other.getContentDisposition())) return false; + if (!getCacheControl() + .equals(other.getCacheControl())) return false; + if (!getContentLanguage() + .equals(other.getContentLanguage())) return false; + if (getMetageneration() + != other.getMetageneration()) return false; + if (hasTimeDeleted() != other.hasTimeDeleted()) return false; + if (hasTimeDeleted()) { + if (!getTimeDeleted() + .equals(other.getTimeDeleted())) return false; + } + if (!getContentType() + .equals(other.getContentType())) return false; + if (getSize() + != other.getSize()) return false; + if (hasTimeCreated() != other.hasTimeCreated()) return false; + if (hasTimeCreated()) { + if (!getTimeCreated() + .equals(other.getTimeCreated())) return false; + } + if (!getCrc32C() + .equals(other.getCrc32C())) return false; + if (getComponentCount() + != other.getComponentCount()) return false; + if (!getMd5Hash() + .equals(other.getMd5Hash())) return false; + if (!getEtag() + .equals(other.getEtag())) return false; + if (hasUpdated() != other.hasUpdated()) return false; + if (hasUpdated()) { + if (!getUpdated() + .equals(other.getUpdated())) return false; + } + if (!getStorageClass() + .equals(other.getStorageClass())) return false; + if (!getKmsKeyName() + .equals(other.getKmsKeyName())) return false; + if (hasTimeStorageClassUpdated() != other.hasTimeStorageClassUpdated()) return false; + if (hasTimeStorageClassUpdated()) { + if (!getTimeStorageClassUpdated() + .equals(other.getTimeStorageClassUpdated())) return false; + } + if (getTemporaryHold() + != other.getTemporaryHold()) return false; + if (hasRetentionExpirationTime() != other.hasRetentionExpirationTime()) return false; + if (hasRetentionExpirationTime()) { + if (!getRetentionExpirationTime() + .equals(other.getRetentionExpirationTime())) return false; + } + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (getEventBasedHold() + != other.getEventBasedHold()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getBucket() + .equals(other.getBucket())) return false; + if (getGeneration() + != other.getGeneration()) return false; + if (hasCustomerEncryption() != other.hasCustomerEncryption()) return false; + if (hasCustomerEncryption()) { + if (!getCustomerEncryption() + .equals(other.getCustomerEncryption())) return false; + } + if (!getMediaLink() + .equals(other.getMediaLink())) return false; + if (!getSelfLink() + .equals(other.getSelfLink())) 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) + CONTENT_ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getContentEncoding().hashCode(); + hash = (37 * hash) + CONTENT_DISPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getContentDisposition().hashCode(); + hash = (37 * hash) + CACHE_CONTROL_FIELD_NUMBER; + hash = (53 * hash) + getCacheControl().hashCode(); + hash = (37 * hash) + CONTENT_LANGUAGE_FIELD_NUMBER; + hash = (53 * hash) + getContentLanguage().hashCode(); + hash = (37 * hash) + METAGENERATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMetageneration()); + if (hasTimeDeleted()) { + hash = (37 * hash) + TIME_DELETED_FIELD_NUMBER; + hash = (53 * hash) + getTimeDeleted().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getContentType().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSize()); + if (hasTimeCreated()) { + hash = (37 * hash) + TIME_CREATED_FIELD_NUMBER; + hash = (53 * hash) + getTimeCreated().hashCode(); + } + hash = (37 * hash) + CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getCrc32C().hashCode(); + hash = (37 * hash) + COMPONENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getComponentCount(); + hash = (37 * hash) + MD5_HASH_FIELD_NUMBER; + hash = (53 * hash) + getMd5Hash().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (hasUpdated()) { + hash = (37 * hash) + UPDATED_FIELD_NUMBER; + hash = (53 * hash) + getUpdated().hashCode(); + } + hash = (37 * hash) + STORAGE_CLASS_FIELD_NUMBER; + hash = (53 * hash) + getStorageClass().hashCode(); + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + if (hasTimeStorageClassUpdated()) { + hash = (37 * hash) + TIME_STORAGE_CLASS_UPDATED_FIELD_NUMBER; + hash = (53 * hash) + getTimeStorageClassUpdated().hashCode(); + } + hash = (37 * hash) + TEMPORARY_HOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getTemporaryHold()); + if (hasRetentionExpirationTime()) { + hash = (37 * hash) + RETENTION_EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRetentionExpirationTime().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (37 * hash) + EVENT_BASED_HOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEventBasedHold()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + hash = (37 * hash) + GENERATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGeneration()); + if (hasCustomerEncryption()) { + hash = (37 * hash) + CUSTOMER_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getCustomerEncryption().hashCode(); + } + hash = (37 * hash) + MEDIA_LINK_FIELD_NUMBER; + hash = (53 * hash) + getMediaLink().hashCode(); + hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; + hash = (53 * hash) + getSelfLink().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData 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 google.events.cloud.storage.v1.Data.StorageObjectData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData 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 google.events.cloud.storage.v1.Data.StorageObjectData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.storage.v1.Data.StorageObjectData 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(google.events.cloud.storage.v1.Data.StorageObjectData 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; + } + /** + *
+     * An object within Google Cloud Storage.
+     * 
+ * + * Protobuf type {@code google.events.cloud.storage.v1.StorageObjectData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.cloud.storage.v1.StorageObjectData) + google.events.cloud.storage.v1.Data.StorageObjectDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 21: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 21: + return internalGetMutableMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.storage.v1.Data.StorageObjectData.class, google.events.cloud.storage.v1.Data.StorageObjectData.Builder.class); + } + + // Construct using google.events.cloud.storage.v1.Data.StorageObjectData.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(); + contentEncoding_ = ""; + + contentDisposition_ = ""; + + cacheControl_ = ""; + + contentLanguage_ = ""; + + metageneration_ = 0L; + + if (timeDeletedBuilder_ == null) { + timeDeleted_ = null; + } else { + timeDeleted_ = null; + timeDeletedBuilder_ = null; + } + contentType_ = ""; + + size_ = 0L; + + if (timeCreatedBuilder_ == null) { + timeCreated_ = null; + } else { + timeCreated_ = null; + timeCreatedBuilder_ = null; + } + crc32C_ = ""; + + componentCount_ = 0; + + md5Hash_ = ""; + + etag_ = ""; + + if (updatedBuilder_ == null) { + updated_ = null; + } else { + updated_ = null; + updatedBuilder_ = null; + } + storageClass_ = ""; + + kmsKeyName_ = ""; + + if (timeStorageClassUpdatedBuilder_ == null) { + timeStorageClassUpdated_ = null; + } else { + timeStorageClassUpdated_ = null; + timeStorageClassUpdatedBuilder_ = null; + } + temporaryHold_ = false; + + if (retentionExpirationTimeBuilder_ == null) { + retentionExpirationTime_ = null; + } else { + retentionExpirationTime_ = null; + retentionExpirationTimeBuilder_ = null; + } + internalGetMutableMetadata().clear(); + eventBasedHold_ = false; + + name_ = ""; + + id_ = ""; + + bucket_ = ""; + + generation_ = 0L; + + if (customerEncryptionBuilder_ == null) { + customerEncryption_ = null; + } else { + customerEncryption_ = null; + customerEncryptionBuilder_ = null; + } + mediaLink_ = ""; + + selfLink_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.storage.v1.Data.internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor; + } + + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData getDefaultInstanceForType() { + return google.events.cloud.storage.v1.Data.StorageObjectData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData build() { + google.events.cloud.storage.v1.Data.StorageObjectData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.storage.v1.Data.StorageObjectData buildPartial() { + google.events.cloud.storage.v1.Data.StorageObjectData result = new google.events.cloud.storage.v1.Data.StorageObjectData(this); + int from_bitField0_ = bitField0_; + result.contentEncoding_ = contentEncoding_; + result.contentDisposition_ = contentDisposition_; + result.cacheControl_ = cacheControl_; + result.contentLanguage_ = contentLanguage_; + result.metageneration_ = metageneration_; + if (timeDeletedBuilder_ == null) { + result.timeDeleted_ = timeDeleted_; + } else { + result.timeDeleted_ = timeDeletedBuilder_.build(); + } + result.contentType_ = contentType_; + result.size_ = size_; + if (timeCreatedBuilder_ == null) { + result.timeCreated_ = timeCreated_; + } else { + result.timeCreated_ = timeCreatedBuilder_.build(); + } + result.crc32C_ = crc32C_; + result.componentCount_ = componentCount_; + result.md5Hash_ = md5Hash_; + result.etag_ = etag_; + if (updatedBuilder_ == null) { + result.updated_ = updated_; + } else { + result.updated_ = updatedBuilder_.build(); + } + result.storageClass_ = storageClass_; + result.kmsKeyName_ = kmsKeyName_; + if (timeStorageClassUpdatedBuilder_ == null) { + result.timeStorageClassUpdated_ = timeStorageClassUpdated_; + } else { + result.timeStorageClassUpdated_ = timeStorageClassUpdatedBuilder_.build(); + } + result.temporaryHold_ = temporaryHold_; + if (retentionExpirationTimeBuilder_ == null) { + result.retentionExpirationTime_ = retentionExpirationTime_; + } else { + result.retentionExpirationTime_ = retentionExpirationTimeBuilder_.build(); + } + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + result.eventBasedHold_ = eventBasedHold_; + result.name_ = name_; + result.id_ = id_; + result.bucket_ = bucket_; + result.generation_ = generation_; + if (customerEncryptionBuilder_ == null) { + result.customerEncryption_ = customerEncryption_; + } else { + result.customerEncryption_ = customerEncryptionBuilder_.build(); + } + result.mediaLink_ = mediaLink_; + result.selfLink_ = selfLink_; + 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 google.events.cloud.storage.v1.Data.StorageObjectData) { + return mergeFrom((google.events.cloud.storage.v1.Data.StorageObjectData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.storage.v1.Data.StorageObjectData other) { + if (other == google.events.cloud.storage.v1.Data.StorageObjectData.getDefaultInstance()) return this; + if (!other.getContentEncoding().isEmpty()) { + contentEncoding_ = other.contentEncoding_; + onChanged(); + } + if (!other.getContentDisposition().isEmpty()) { + contentDisposition_ = other.contentDisposition_; + onChanged(); + } + if (!other.getCacheControl().isEmpty()) { + cacheControl_ = other.cacheControl_; + onChanged(); + } + if (!other.getContentLanguage().isEmpty()) { + contentLanguage_ = other.contentLanguage_; + onChanged(); + } + if (other.getMetageneration() != 0L) { + setMetageneration(other.getMetageneration()); + } + if (other.hasTimeDeleted()) { + mergeTimeDeleted(other.getTimeDeleted()); + } + if (!other.getContentType().isEmpty()) { + contentType_ = other.contentType_; + onChanged(); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (other.hasTimeCreated()) { + mergeTimeCreated(other.getTimeCreated()); + } + if (!other.getCrc32C().isEmpty()) { + crc32C_ = other.crc32C_; + onChanged(); + } + if (other.getComponentCount() != 0) { + setComponentCount(other.getComponentCount()); + } + if (!other.getMd5Hash().isEmpty()) { + md5Hash_ = other.md5Hash_; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + if (other.hasUpdated()) { + mergeUpdated(other.getUpdated()); + } + if (!other.getStorageClass().isEmpty()) { + storageClass_ = other.storageClass_; + onChanged(); + } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + onChanged(); + } + if (other.hasTimeStorageClassUpdated()) { + mergeTimeStorageClassUpdated(other.getTimeStorageClassUpdated()); + } + if (other.getTemporaryHold() != false) { + setTemporaryHold(other.getTemporaryHold()); + } + if (other.hasRetentionExpirationTime()) { + mergeRetentionExpirationTime(other.getRetentionExpirationTime()); + } + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); + if (other.getEventBasedHold() != false) { + setEventBasedHold(other.getEventBasedHold()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getBucket().isEmpty()) { + bucket_ = other.bucket_; + onChanged(); + } + if (other.getGeneration() != 0L) { + setGeneration(other.getGeneration()); + } + if (other.hasCustomerEncryption()) { + mergeCustomerEncryption(other.getCustomerEncryption()); + } + if (!other.getMediaLink().isEmpty()) { + mediaLink_ = other.mediaLink_; + onChanged(); + } + if (!other.getSelfLink().isEmpty()) { + selfLink_ = other.selfLink_; + 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 { + google.events.cloud.storage.v1.Data.StorageObjectData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.storage.v1.Data.StorageObjectData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object contentEncoding_ = ""; + /** + *
+       * Content-Encoding of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+       * 
+ * + * string content_encoding = 1; + * @return The contentEncoding. + */ + public java.lang.String getContentEncoding() { + java.lang.Object ref = contentEncoding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentEncoding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Content-Encoding of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+       * 
+ * + * string content_encoding = 1; + * @return The bytes for contentEncoding. + */ + public com.google.protobuf.ByteString + getContentEncodingBytes() { + java.lang.Object ref = contentEncoding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Content-Encoding of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+       * 
+ * + * string content_encoding = 1; + * @param value The contentEncoding to set. + * @return This builder for chaining. + */ + public Builder setContentEncoding( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contentEncoding_ = value; + onChanged(); + return this; + } + /** + *
+       * Content-Encoding of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+       * 
+ * + * string content_encoding = 1; + * @return This builder for chaining. + */ + public Builder clearContentEncoding() { + + contentEncoding_ = getDefaultInstance().getContentEncoding(); + onChanged(); + return this; + } + /** + *
+       * Content-Encoding of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+       * 
+ * + * string content_encoding = 1; + * @param value The bytes for contentEncoding to set. + * @return This builder for chaining. + */ + public Builder setContentEncodingBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contentEncoding_ = value; + onChanged(); + return this; + } + + private java.lang.Object contentDisposition_ = ""; + /** + *
+       * Content-Disposition of the object data, matching
+       * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+       * 
+ * + * string content_disposition = 2; + * @return The contentDisposition. + */ + public java.lang.String getContentDisposition() { + java.lang.Object ref = contentDisposition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentDisposition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Content-Disposition of the object data, matching
+       * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+       * 
+ * + * string content_disposition = 2; + * @return The bytes for contentDisposition. + */ + public com.google.protobuf.ByteString + getContentDispositionBytes() { + java.lang.Object ref = contentDisposition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Content-Disposition of the object data, matching
+       * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+       * 
+ * + * string content_disposition = 2; + * @param value The contentDisposition to set. + * @return This builder for chaining. + */ + public Builder setContentDisposition( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contentDisposition_ = value; + onChanged(); + return this; + } + /** + *
+       * Content-Disposition of the object data, matching
+       * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+       * 
+ * + * string content_disposition = 2; + * @return This builder for chaining. + */ + public Builder clearContentDisposition() { + + contentDisposition_ = getDefaultInstance().getContentDisposition(); + onChanged(); + return this; + } + /** + *
+       * Content-Disposition of the object data, matching
+       * [https://tools.ietf.org/html/rfc6266][RFC 6266].
+       * 
+ * + * string content_disposition = 2; + * @param value The bytes for contentDisposition to set. + * @return This builder for chaining. + */ + public Builder setContentDispositionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contentDisposition_ = value; + onChanged(); + return this; + } + + private java.lang.Object cacheControl_ = ""; + /** + *
+       * Cache-Control directive for the object data, matching
+       * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+       * 
+ * + * string cache_control = 3; + * @return The cacheControl. + */ + public java.lang.String getCacheControl() { + java.lang.Object ref = cacheControl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheControl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Cache-Control directive for the object data, matching
+       * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+       * 
+ * + * string cache_control = 3; + * @return The bytes for cacheControl. + */ + public com.google.protobuf.ByteString + getCacheControlBytes() { + java.lang.Object ref = cacheControl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheControl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Cache-Control directive for the object data, matching
+       * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+       * 
+ * + * string cache_control = 3; + * @param value The cacheControl to set. + * @return This builder for chaining. + */ + public Builder setCacheControl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cacheControl_ = value; + onChanged(); + return this; + } + /** + *
+       * Cache-Control directive for the object data, matching
+       * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+       * 
+ * + * string cache_control = 3; + * @return This builder for chaining. + */ + public Builder clearCacheControl() { + + cacheControl_ = getDefaultInstance().getCacheControl(); + onChanged(); + return this; + } + /** + *
+       * Cache-Control directive for the object data, matching
+       * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+       * 
+ * + * string cache_control = 3; + * @param value The bytes for cacheControl to set. + * @return This builder for chaining. + */ + public Builder setCacheControlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cacheControl_ = value; + onChanged(); + return this; + } + + private java.lang.Object contentLanguage_ = ""; + /** + *
+       * Content-Language of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+       * 
+ * + * string content_language = 5; + * @return The contentLanguage. + */ + public java.lang.String getContentLanguage() { + java.lang.Object ref = contentLanguage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentLanguage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Content-Language of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+       * 
+ * + * string content_language = 5; + * @return The bytes for contentLanguage. + */ + public com.google.protobuf.ByteString + getContentLanguageBytes() { + java.lang.Object ref = contentLanguage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentLanguage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Content-Language of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+       * 
+ * + * string content_language = 5; + * @param value The contentLanguage to set. + * @return This builder for chaining. + */ + public Builder setContentLanguage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contentLanguage_ = value; + onChanged(); + return this; + } + /** + *
+       * Content-Language of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+       * 
+ * + * string content_language = 5; + * @return This builder for chaining. + */ + public Builder clearContentLanguage() { + + contentLanguage_ = getDefaultInstance().getContentLanguage(); + onChanged(); + return this; + } + /** + *
+       * Content-Language of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+       * 
+ * + * string content_language = 5; + * @param value The bytes for contentLanguage to set. + * @return This builder for chaining. + */ + public Builder setContentLanguageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contentLanguage_ = value; + onChanged(); + return this; + } + + private long metageneration_ ; + /** + *
+       * The version of the metadata for this object at this generation. Used for
+       * preconditions and for detecting changes in metadata. A metageneration
+       * number is only meaningful in the context of a particular generation of a
+       * particular object.
+       * 
+ * + * int64 metageneration = 6; + * @return The metageneration. + */ + @java.lang.Override + public long getMetageneration() { + return metageneration_; + } + /** + *
+       * The version of the metadata for this object at this generation. Used for
+       * preconditions and for detecting changes in metadata. A metageneration
+       * number is only meaningful in the context of a particular generation of a
+       * particular object.
+       * 
+ * + * int64 metageneration = 6; + * @param value The metageneration to set. + * @return This builder for chaining. + */ + public Builder setMetageneration(long value) { + + metageneration_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the metadata for this object at this generation. Used for
+       * preconditions and for detecting changes in metadata. A metageneration
+       * number is only meaningful in the context of a particular generation of a
+       * particular object.
+       * 
+ * + * int64 metageneration = 6; + * @return This builder for chaining. + */ + public Builder clearMetageneration() { + + metageneration_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timeDeleted_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeDeletedBuilder_; + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + * @return Whether the timeDeleted field is set. + */ + public boolean hasTimeDeleted() { + return timeDeletedBuilder_ != null || timeDeleted_ != null; + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + * @return The timeDeleted. + */ + public com.google.protobuf.Timestamp getTimeDeleted() { + if (timeDeletedBuilder_ == null) { + return timeDeleted_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timeDeleted_; + } else { + return timeDeletedBuilder_.getMessage(); + } + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + public Builder setTimeDeleted(com.google.protobuf.Timestamp value) { + if (timeDeletedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeDeleted_ = value; + onChanged(); + } else { + timeDeletedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + public Builder setTimeDeleted( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timeDeletedBuilder_ == null) { + timeDeleted_ = builderForValue.build(); + onChanged(); + } else { + timeDeletedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + public Builder mergeTimeDeleted(com.google.protobuf.Timestamp value) { + if (timeDeletedBuilder_ == null) { + if (timeDeleted_ != null) { + timeDeleted_ = + com.google.protobuf.Timestamp.newBuilder(timeDeleted_).mergeFrom(value).buildPartial(); + } else { + timeDeleted_ = value; + } + onChanged(); + } else { + timeDeletedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + public Builder clearTimeDeleted() { + if (timeDeletedBuilder_ == null) { + timeDeleted_ = null; + onChanged(); + } else { + timeDeleted_ = null; + timeDeletedBuilder_ = null; + } + + return this; + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + public com.google.protobuf.Timestamp.Builder getTimeDeletedBuilder() { + + onChanged(); + return getTimeDeletedFieldBuilder().getBuilder(); + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + public com.google.protobuf.TimestampOrBuilder getTimeDeletedOrBuilder() { + if (timeDeletedBuilder_ != null) { + return timeDeletedBuilder_.getMessageOrBuilder(); + } else { + return timeDeleted_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timeDeleted_; + } + } + /** + *
+       * The deletion time of the object. Will be returned if and only if this
+       * version of the object has been deleted.
+       * 
+ * + * .google.protobuf.Timestamp time_deleted = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimeDeletedFieldBuilder() { + if (timeDeletedBuilder_ == null) { + timeDeletedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimeDeleted(), + getParentForChildren(), + isClean()); + timeDeleted_ = null; + } + return timeDeletedBuilder_; + } + + private java.lang.Object contentType_ = ""; + /** + *
+       * Content-Type of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+       * If an object is stored without a Content-Type, it is served as
+       * `application/octet-stream`.
+       * 
+ * + * string content_type = 8; + * @return The contentType. + */ + public java.lang.String getContentType() { + java.lang.Object ref = contentType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Content-Type of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+       * If an object is stored without a Content-Type, it is served as
+       * `application/octet-stream`.
+       * 
+ * + * string content_type = 8; + * @return The bytes for contentType. + */ + public com.google.protobuf.ByteString + getContentTypeBytes() { + java.lang.Object ref = contentType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Content-Type of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+       * If an object is stored without a Content-Type, it is served as
+       * `application/octet-stream`.
+       * 
+ * + * string content_type = 8; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+       * Content-Type of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+       * If an object is stored without a Content-Type, it is served as
+       * `application/octet-stream`.
+       * 
+ * + * string content_type = 8; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = getDefaultInstance().getContentType(); + onChanged(); + return this; + } + /** + *
+       * Content-Type of the object data, matching
+       * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+       * If an object is stored without a Content-Type, it is served as
+       * `application/octet-stream`.
+       * 
+ * + * string content_type = 8; + * @param value The bytes for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contentType_ = value; + onChanged(); + return this; + } + + private long size_ ; + /** + *
+       * Content-Length of the object data in bytes, matching
+       * [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
+       * 
+ * + * int64 size = 9; + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + /** + *
+       * Content-Length of the object data in bytes, matching
+       * [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
+       * 
+ * + * int64 size = 9; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + *
+       * Content-Length of the object data in bytes, matching
+       * [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
+       * 
+ * + * int64 size = 9; + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timeCreated_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeCreatedBuilder_; + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + * @return Whether the timeCreated field is set. + */ + public boolean hasTimeCreated() { + return timeCreatedBuilder_ != null || timeCreated_ != null; + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + * @return The timeCreated. + */ + public com.google.protobuf.Timestamp getTimeCreated() { + if (timeCreatedBuilder_ == null) { + return timeCreated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timeCreated_; + } else { + return timeCreatedBuilder_.getMessage(); + } + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + public Builder setTimeCreated(com.google.protobuf.Timestamp value) { + if (timeCreatedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeCreated_ = value; + onChanged(); + } else { + timeCreatedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + public Builder setTimeCreated( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timeCreatedBuilder_ == null) { + timeCreated_ = builderForValue.build(); + onChanged(); + } else { + timeCreatedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + public Builder mergeTimeCreated(com.google.protobuf.Timestamp value) { + if (timeCreatedBuilder_ == null) { + if (timeCreated_ != null) { + timeCreated_ = + com.google.protobuf.Timestamp.newBuilder(timeCreated_).mergeFrom(value).buildPartial(); + } else { + timeCreated_ = value; + } + onChanged(); + } else { + timeCreatedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + public Builder clearTimeCreated() { + if (timeCreatedBuilder_ == null) { + timeCreated_ = null; + onChanged(); + } else { + timeCreated_ = null; + timeCreatedBuilder_ = null; + } + + return this; + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + public com.google.protobuf.Timestamp.Builder getTimeCreatedBuilder() { + + onChanged(); + return getTimeCreatedFieldBuilder().getBuilder(); + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + public com.google.protobuf.TimestampOrBuilder getTimeCreatedOrBuilder() { + if (timeCreatedBuilder_ != null) { + return timeCreatedBuilder_.getMessageOrBuilder(); + } else { + return timeCreated_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timeCreated_; + } + } + /** + *
+       * The creation time of the object.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * .google.protobuf.Timestamp time_created = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimeCreatedFieldBuilder() { + if (timeCreatedBuilder_ == null) { + timeCreatedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimeCreated(), + getParentForChildren(), + isClean()); + timeCreated_ = null; + } + return timeCreatedBuilder_; + } + + private java.lang.Object crc32C_ = ""; + /** + *
+       * CRC32c checksum. For more information about using the CRC32c
+       * checksum, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string crc32c = 11; + * @return The crc32c. + */ + public java.lang.String getCrc32C() { + java.lang.Object ref = crc32C_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crc32C_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * CRC32c checksum. For more information about using the CRC32c
+       * checksum, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string crc32c = 11; + * @return The bytes for crc32c. + */ + public com.google.protobuf.ByteString + getCrc32CBytes() { + java.lang.Object ref = crc32C_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + crc32C_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * CRC32c checksum. For more information about using the CRC32c
+       * checksum, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string crc32c = 11; + * @param value The crc32c to set. + * @return This builder for chaining. + */ + public Builder setCrc32C( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + crc32C_ = value; + onChanged(); + return this; + } + /** + *
+       * CRC32c checksum. For more information about using the CRC32c
+       * checksum, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string crc32c = 11; + * @return This builder for chaining. + */ + public Builder clearCrc32C() { + + crc32C_ = getDefaultInstance().getCrc32C(); + onChanged(); + return this; + } + /** + *
+       * CRC32c checksum. For more information about using the CRC32c
+       * checksum, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string crc32c = 11; + * @param value The bytes for crc32c to set. + * @return This builder for chaining. + */ + public Builder setCrc32CBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + crc32C_ = value; + onChanged(); + return this; + } + + private int componentCount_ ; + /** + *
+       * Number of underlying components that make up this object. Components are
+       * accumulated by compose operations.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * int32 component_count = 12; + * @return The componentCount. + */ + @java.lang.Override + public int getComponentCount() { + return componentCount_; + } + /** + *
+       * Number of underlying components that make up this object. Components are
+       * accumulated by compose operations.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * int32 component_count = 12; + * @param value The componentCount to set. + * @return This builder for chaining. + */ + public Builder setComponentCount(int value) { + + componentCount_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of underlying components that make up this object. Components are
+       * accumulated by compose operations.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * int32 component_count = 12; + * @return This builder for chaining. + */ + public Builder clearComponentCount() { + + componentCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object md5Hash_ = ""; + /** + *
+       * MD5 hash of the data; encoded using base64 as per
+       * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+       * information about using the MD5 hash, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string md5_hash = 13; + * @return The md5Hash. + */ + public java.lang.String getMd5Hash() { + java.lang.Object ref = md5Hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + md5Hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * MD5 hash of the data; encoded using base64 as per
+       * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+       * information about using the MD5 hash, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string md5_hash = 13; + * @return The bytes for md5Hash. + */ + public com.google.protobuf.ByteString + getMd5HashBytes() { + java.lang.Object ref = md5Hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + md5Hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * MD5 hash of the data; encoded using base64 as per
+       * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+       * information about using the MD5 hash, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string md5_hash = 13; + * @param value The md5Hash to set. + * @return This builder for chaining. + */ + public Builder setMd5Hash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + md5Hash_ = value; + onChanged(); + return this; + } + /** + *
+       * MD5 hash of the data; encoded using base64 as per
+       * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+       * information about using the MD5 hash, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string md5_hash = 13; + * @return This builder for chaining. + */ + public Builder clearMd5Hash() { + + md5Hash_ = getDefaultInstance().getMd5Hash(); + onChanged(); + return this; + } + /** + *
+       * MD5 hash of the data; encoded using base64 as per
+       * [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
+       * information about using the MD5 hash, see
+       * [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
+       * ETags: Best Practices].
+       * 
+ * + * string md5_hash = 13; + * @param value The bytes for md5Hash to set. + * @return This builder for chaining. + */ + public Builder setMd5HashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + md5Hash_ = value; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + *
+       * HTTP 1.1 Entity tag for the object. See
+       * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+       * 
+ * + * string etag = 14; + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * HTTP 1.1 Entity tag for the object. See
+       * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+       * 
+ * + * string etag = 14; + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString + getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * HTTP 1.1 Entity tag for the object. See
+       * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+       * 
+ * + * string etag = 14; + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + *
+       * HTTP 1.1 Entity tag for the object. See
+       * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+       * 
+ * + * string etag = 14; + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + *
+       * HTTP 1.1 Entity tag for the object. See
+       * [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
+       * 
+ * + * string etag = 14; + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updated_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updatedBuilder_; + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + * @return Whether the updated field is set. + */ + public boolean hasUpdated() { + return updatedBuilder_ != null || updated_ != null; + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + * @return The updated. + */ + public com.google.protobuf.Timestamp getUpdated() { + if (updatedBuilder_ == null) { + return updated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updated_; + } else { + return updatedBuilder_.getMessage(); + } + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + public Builder setUpdated(com.google.protobuf.Timestamp value) { + if (updatedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updated_ = value; + onChanged(); + } else { + updatedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + public Builder setUpdated( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updatedBuilder_ == null) { + updated_ = builderForValue.build(); + onChanged(); + } else { + updatedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + public Builder mergeUpdated(com.google.protobuf.Timestamp value) { + if (updatedBuilder_ == null) { + if (updated_ != null) { + updated_ = + com.google.protobuf.Timestamp.newBuilder(updated_).mergeFrom(value).buildPartial(); + } else { + updated_ = value; + } + onChanged(); + } else { + updatedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + public Builder clearUpdated() { + if (updatedBuilder_ == null) { + updated_ = null; + onChanged(); + } else { + updated_ = null; + updatedBuilder_ = null; + } + + return this; + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + public com.google.protobuf.Timestamp.Builder getUpdatedBuilder() { + + onChanged(); + return getUpdatedFieldBuilder().getBuilder(); + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + public com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder() { + if (updatedBuilder_ != null) { + return updatedBuilder_.getMessageOrBuilder(); + } else { + return updated_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updated_; + } + } + /** + *
+       * The modification time of the object metadata.
+       * 
+ * + * .google.protobuf.Timestamp updated = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdatedFieldBuilder() { + if (updatedBuilder_ == null) { + updatedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdated(), + getParentForChildren(), + isClean()); + updated_ = null; + } + return updatedBuilder_; + } + + private java.lang.Object storageClass_ = ""; + /** + *
+       * Storage class of the object.
+       * 
+ * + * string storage_class = 16; + * @return The storageClass. + */ + public java.lang.String getStorageClass() { + java.lang.Object ref = storageClass_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storageClass_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Storage class of the object.
+       * 
+ * + * string storage_class = 16; + * @return The bytes for storageClass. + */ + public com.google.protobuf.ByteString + getStorageClassBytes() { + java.lang.Object ref = storageClass_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + storageClass_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Storage class of the object.
+       * 
+ * + * string storage_class = 16; + * @param value The storageClass to set. + * @return This builder for chaining. + */ + public Builder setStorageClass( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + storageClass_ = value; + onChanged(); + return this; + } + /** + *
+       * Storage class of the object.
+       * 
+ * + * string storage_class = 16; + * @return This builder for chaining. + */ + public Builder clearStorageClass() { + + storageClass_ = getDefaultInstance().getStorageClass(); + onChanged(); + return this; + } + /** + *
+       * Storage class of the object.
+       * 
+ * + * string storage_class = 16; + * @param value The bytes for storageClass to set. + * @return This builder for chaining. + */ + public Builder setStorageClassBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + storageClass_ = value; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + /** + *
+       * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+       * such a key.
+       * 
+ * + * string kms_key_name = 17; + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+       * such a key.
+       * 
+ * + * string kms_key_name = 17; + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString + getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+       * such a key.
+       * 
+ * + * string kms_key_name = 17; + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyName_ = value; + onChanged(); + return this; + } + /** + *
+       * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+       * such a key.
+       * 
+ * + * string kms_key_name = 17; + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + onChanged(); + return this; + } + /** + *
+       * Cloud KMS Key used to encrypt this object, if the object is encrypted by
+       * such a key.
+       * 
+ * + * string kms_key_name = 17; + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timeStorageClassUpdated_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeStorageClassUpdatedBuilder_; + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + * @return Whether the timeStorageClassUpdated field is set. + */ + public boolean hasTimeStorageClassUpdated() { + return timeStorageClassUpdatedBuilder_ != null || timeStorageClassUpdated_ != null; + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + * @return The timeStorageClassUpdated. + */ + public com.google.protobuf.Timestamp getTimeStorageClassUpdated() { + if (timeStorageClassUpdatedBuilder_ == null) { + return timeStorageClassUpdated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timeStorageClassUpdated_; + } else { + return timeStorageClassUpdatedBuilder_.getMessage(); + } + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + public Builder setTimeStorageClassUpdated(com.google.protobuf.Timestamp value) { + if (timeStorageClassUpdatedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeStorageClassUpdated_ = value; + onChanged(); + } else { + timeStorageClassUpdatedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + public Builder setTimeStorageClassUpdated( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timeStorageClassUpdatedBuilder_ == null) { + timeStorageClassUpdated_ = builderForValue.build(); + onChanged(); + } else { + timeStorageClassUpdatedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + public Builder mergeTimeStorageClassUpdated(com.google.protobuf.Timestamp value) { + if (timeStorageClassUpdatedBuilder_ == null) { + if (timeStorageClassUpdated_ != null) { + timeStorageClassUpdated_ = + com.google.protobuf.Timestamp.newBuilder(timeStorageClassUpdated_).mergeFrom(value).buildPartial(); + } else { + timeStorageClassUpdated_ = value; + } + onChanged(); + } else { + timeStorageClassUpdatedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + public Builder clearTimeStorageClassUpdated() { + if (timeStorageClassUpdatedBuilder_ == null) { + timeStorageClassUpdated_ = null; + onChanged(); + } else { + timeStorageClassUpdated_ = null; + timeStorageClassUpdatedBuilder_ = null; + } + + return this; + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + public com.google.protobuf.Timestamp.Builder getTimeStorageClassUpdatedBuilder() { + + onChanged(); + return getTimeStorageClassUpdatedFieldBuilder().getBuilder(); + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + public com.google.protobuf.TimestampOrBuilder getTimeStorageClassUpdatedOrBuilder() { + if (timeStorageClassUpdatedBuilder_ != null) { + return timeStorageClassUpdatedBuilder_.getMessageOrBuilder(); + } else { + return timeStorageClassUpdated_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timeStorageClassUpdated_; + } + } + /** + *
+       * The time at which the object's storage class was last changed.
+       * 
+ * + * .google.protobuf.Timestamp time_storage_class_updated = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimeStorageClassUpdatedFieldBuilder() { + if (timeStorageClassUpdatedBuilder_ == null) { + timeStorageClassUpdatedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimeStorageClassUpdated(), + getParentForChildren(), + isClean()); + timeStorageClassUpdated_ = null; + } + return timeStorageClassUpdatedBuilder_; + } + + private boolean temporaryHold_ ; + /** + *
+       * Whether an object is under temporary hold.
+       * 
+ * + * bool temporary_hold = 19; + * @return The temporaryHold. + */ + @java.lang.Override + public boolean getTemporaryHold() { + return temporaryHold_; + } + /** + *
+       * Whether an object is under temporary hold.
+       * 
+ * + * bool temporary_hold = 19; + * @param value The temporaryHold to set. + * @return This builder for chaining. + */ + public Builder setTemporaryHold(boolean value) { + + temporaryHold_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether an object is under temporary hold.
+       * 
+ * + * bool temporary_hold = 19; + * @return This builder for chaining. + */ + public Builder clearTemporaryHold() { + + temporaryHold_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp retentionExpirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> retentionExpirationTimeBuilder_; + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + * @return Whether the retentionExpirationTime field is set. + */ + public boolean hasRetentionExpirationTime() { + return retentionExpirationTimeBuilder_ != null || retentionExpirationTime_ != null; + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + * @return The retentionExpirationTime. + */ + public com.google.protobuf.Timestamp getRetentionExpirationTime() { + if (retentionExpirationTimeBuilder_ == null) { + return retentionExpirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : retentionExpirationTime_; + } else { + return retentionExpirationTimeBuilder_.getMessage(); + } + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + public Builder setRetentionExpirationTime(com.google.protobuf.Timestamp value) { + if (retentionExpirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retentionExpirationTime_ = value; + onChanged(); + } else { + retentionExpirationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + public Builder setRetentionExpirationTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (retentionExpirationTimeBuilder_ == null) { + retentionExpirationTime_ = builderForValue.build(); + onChanged(); + } else { + retentionExpirationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + public Builder mergeRetentionExpirationTime(com.google.protobuf.Timestamp value) { + if (retentionExpirationTimeBuilder_ == null) { + if (retentionExpirationTime_ != null) { + retentionExpirationTime_ = + com.google.protobuf.Timestamp.newBuilder(retentionExpirationTime_).mergeFrom(value).buildPartial(); + } else { + retentionExpirationTime_ = value; + } + onChanged(); + } else { + retentionExpirationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + public Builder clearRetentionExpirationTime() { + if (retentionExpirationTimeBuilder_ == null) { + retentionExpirationTime_ = null; + onChanged(); + } else { + retentionExpirationTime_ = null; + retentionExpirationTimeBuilder_ = null; + } + + return this; + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + public com.google.protobuf.Timestamp.Builder getRetentionExpirationTimeBuilder() { + + onChanged(); + return getRetentionExpirationTimeFieldBuilder().getBuilder(); + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + public com.google.protobuf.TimestampOrBuilder getRetentionExpirationTimeOrBuilder() { + if (retentionExpirationTimeBuilder_ != null) { + return retentionExpirationTimeBuilder_.getMessageOrBuilder(); + } else { + return retentionExpirationTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : retentionExpirationTime_; + } + } + /** + *
+       * A server-determined value that specifies the earliest time that the
+       * object's retention period expires.
+       * 
+ * + * .google.protobuf.Timestamp retention_expiration_time = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRetentionExpirationTimeFieldBuilder() { + if (retentionExpirationTimeBuilder_ == null) { + retentionExpirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRetentionExpirationTime(), + getParentForChildren(), + isClean()); + retentionExpirationTime_ = null; + } + return retentionExpirationTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + private com.google.protobuf.MapField + internalGetMutableMetadata() { + onChanged();; + if (metadata_ == null) { + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + @java.lang.Override + + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + @java.lang.Override + + public java.lang.String getMetadataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + @java.lang.Override + + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + internalGetMutableMetadata().getMutableMap() + .clear(); + return this; + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + + public Builder removeMetadata( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableMetadata().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetadata() { + return internalGetMutableMetadata().getMutableMap(); + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + public Builder putMetadata( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableMetadata().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * User-provided metadata, in key/value pairs.
+       * 
+ * + * map<string, string> metadata = 21; + */ + + public Builder putAllMetadata( + java.util.Map values) { + internalGetMutableMetadata().getMutableMap() + .putAll(values); + return this; + } + + private boolean eventBasedHold_ ; + /** + *
+       * Whether an object is under event-based hold.
+       * 
+ * + * bool event_based_hold = 29; + * @return The eventBasedHold. + */ + @java.lang.Override + public boolean getEventBasedHold() { + return eventBasedHold_; + } + /** + *
+       * Whether an object is under event-based hold.
+       * 
+ * + * bool event_based_hold = 29; + * @param value The eventBasedHold to set. + * @return This builder for chaining. + */ + public Builder setEventBasedHold(boolean value) { + + eventBasedHold_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether an object is under event-based hold.
+       * 
+ * + * bool event_based_hold = 29; + * @return This builder for chaining. + */ + public Builder clearEventBasedHold() { + + eventBasedHold_ = false; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The name of the object.
+       * 
+ * + * string name = 23; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the object.
+       * 
+ * + * string name = 23; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the object.
+       * 
+ * + * string name = 23; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the object.
+       * 
+ * + * string name = 23; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The name of the object.
+       * 
+ * + * string name = 23; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+       * The ID of the object, including the bucket name, object name, and
+       * generation number.
+       * 
+ * + * string id = 24; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The ID of the object, including the bucket name, object name, and
+       * generation number.
+       * 
+ * + * string id = 24; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The ID of the object, including the bucket name, object name, and
+       * generation number.
+       * 
+ * + * string id = 24; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * The ID of the object, including the bucket name, object name, and
+       * generation number.
+       * 
+ * + * string id = 24; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+       * The ID of the object, including the bucket name, object name, and
+       * generation number.
+       * 
+ * + * string id = 24; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object bucket_ = ""; + /** + *
+       * The name of the bucket containing this object.
+       * 
+ * + * string bucket = 25; + * @return The bucket. + */ + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the bucket containing this object.
+       * 
+ * + * string bucket = 25; + * @return The bytes for bucket. + */ + public com.google.protobuf.ByteString + getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the bucket containing this object.
+       * 
+ * + * string bucket = 25; + * @param value The bucket to set. + * @return This builder for chaining. + */ + public Builder setBucket( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bucket_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the bucket containing this object.
+       * 
+ * + * string bucket = 25; + * @return This builder for chaining. + */ + public Builder clearBucket() { + + bucket_ = getDefaultInstance().getBucket(); + onChanged(); + return this; + } + /** + *
+       * The name of the bucket containing this object.
+       * 
+ * + * string bucket = 25; + * @param value The bytes for bucket to set. + * @return This builder for chaining. + */ + public Builder setBucketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bucket_ = value; + onChanged(); + return this; + } + + private long generation_ ; + /** + *
+       * The content generation of this object. Used for object versioning.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * int64 generation = 26; + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + /** + *
+       * The content generation of this object. Used for object versioning.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * int64 generation = 26; + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(long value) { + + generation_ = value; + onChanged(); + return this; + } + /** + *
+       * The content generation of this object. Used for object versioning.
+       * Attempting to set this field will result in an error.
+       * 
+ * + * int64 generation = 26; + * @return This builder for chaining. + */ + public Builder clearGeneration() { + + generation_ = 0L; + onChanged(); + return this; + } + + private google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption customerEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder> customerEncryptionBuilder_; + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + * @return Whether the customerEncryption field is set. + */ + public boolean hasCustomerEncryption() { + return customerEncryptionBuilder_ != null || customerEncryption_ != null; + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + * @return The customerEncryption. + */ + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption getCustomerEncryption() { + if (customerEncryptionBuilder_ == null) { + return customerEncryption_ == null ? google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.getDefaultInstance() : customerEncryption_; + } else { + return customerEncryptionBuilder_.getMessage(); + } + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + public Builder setCustomerEncryption(google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption value) { + if (customerEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customerEncryption_ = value; + onChanged(); + } else { + customerEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + public Builder setCustomerEncryption( + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder builderForValue) { + if (customerEncryptionBuilder_ == null) { + customerEncryption_ = builderForValue.build(); + onChanged(); + } else { + customerEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + public Builder mergeCustomerEncryption(google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption value) { + if (customerEncryptionBuilder_ == null) { + if (customerEncryption_ != null) { + customerEncryption_ = + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.newBuilder(customerEncryption_).mergeFrom(value).buildPartial(); + } else { + customerEncryption_ = value; + } + onChanged(); + } else { + customerEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + public Builder clearCustomerEncryption() { + if (customerEncryptionBuilder_ == null) { + customerEncryption_ = null; + onChanged(); + } else { + customerEncryption_ = null; + customerEncryptionBuilder_ = null; + } + + return this; + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder getCustomerEncryptionBuilder() { + + onChanged(); + return getCustomerEncryptionFieldBuilder().getBuilder(); + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + public google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder() { + if (customerEncryptionBuilder_ != null) { + return customerEncryptionBuilder_.getMessageOrBuilder(); + } else { + return customerEncryption_ == null ? + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.getDefaultInstance() : customerEncryption_; + } + } + /** + *
+       * Metadata of customer-supplied encryption key, if the object is encrypted by
+       * such a key.
+       * 
+ * + * .google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder> + getCustomerEncryptionFieldBuilder() { + if (customerEncryptionBuilder_ == null) { + customerEncryptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryption.Builder, google.events.cloud.storage.v1.Data.StorageObjectData.CustomerEncryptionOrBuilder>( + getCustomerEncryption(), + getParentForChildren(), + isClean()); + customerEncryption_ = null; + } + return customerEncryptionBuilder_; + } + + private java.lang.Object mediaLink_ = ""; + /** + *
+       * The link to this object.
+       * 
+ * + * string media_link = 100; + * @return The mediaLink. + */ + public java.lang.String getMediaLink() { + java.lang.Object ref = mediaLink_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mediaLink_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The link to this object.
+       * 
+ * + * string media_link = 100; + * @return The bytes for mediaLink. + */ + public com.google.protobuf.ByteString + getMediaLinkBytes() { + java.lang.Object ref = mediaLink_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mediaLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The link to this object.
+       * 
+ * + * string media_link = 100; + * @param value The mediaLink to set. + * @return This builder for chaining. + */ + public Builder setMediaLink( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mediaLink_ = value; + onChanged(); + return this; + } + /** + *
+       * The link to this object.
+       * 
+ * + * string media_link = 100; + * @return This builder for chaining. + */ + public Builder clearMediaLink() { + + mediaLink_ = getDefaultInstance().getMediaLink(); + onChanged(); + return this; + } + /** + *
+       * The link to this object.
+       * 
+ * + * string media_link = 100; + * @param value The bytes for mediaLink to set. + * @return This builder for chaining. + */ + public Builder setMediaLinkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mediaLink_ = value; + onChanged(); + return this; + } + + private java.lang.Object selfLink_ = ""; + /** + *
+       * Media download link.
+       * 
+ * + * string self_link = 101; + * @return The selfLink. + */ + public java.lang.String getSelfLink() { + java.lang.Object ref = selfLink_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selfLink_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Media download link.
+       * 
+ * + * string self_link = 101; + * @return The bytes for selfLink. + */ + public com.google.protobuf.ByteString + getSelfLinkBytes() { + java.lang.Object ref = selfLink_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selfLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Media download link.
+       * 
+ * + * string self_link = 101; + * @param value The selfLink to set. + * @return This builder for chaining. + */ + public Builder setSelfLink( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selfLink_ = value; + onChanged(); + return this; + } + /** + *
+       * Media download link.
+       * 
+ * + * string self_link = 101; + * @return This builder for chaining. + */ + public Builder clearSelfLink() { + + selfLink_ = getDefaultInstance().getSelfLink(); + onChanged(); + return this; + } + /** + *
+       * Media download link.
+       * 
+ * + * string self_link = 101; + * @param value The bytes for selfLink to set. + * @return This builder for chaining. + */ + public Builder setSelfLinkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selfLink_ = 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:google.events.cloud.storage.v1.StorageObjectData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.storage.v1.StorageObjectData) + private static final google.events.cloud.storage.v1.Data.StorageObjectData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.storage.v1.Data.StorageObjectData(); + } + + public static google.events.cloud.storage.v1.Data.StorageObjectData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageObjectData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StorageObjectData(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 google.events.cloud.storage.v1.Data.StorageObjectData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_storage_v1_StorageObjectData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_storage_v1_StorageObjectData_MetadataEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_storage_v1_StorageObjectData_MetadataEntry_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)google/events/cloud/storage/v1/data.pr" + + "oto\022\036google.events.cloud.storage.v1\032\037goo" + + "gle/protobuf/timestamp.proto\"\203\010\n\021Storage" + + "ObjectData\022\030\n\020content_encoding\030\001 \001(\t\022\033\n\023" + + "content_disposition\030\002 \001(\t\022\025\n\rcache_contr" + + "ol\030\003 \001(\t\022\030\n\020content_language\030\005 \001(\t\022\026\n\016me" + + "tageneration\030\006 \001(\003\0220\n\014time_deleted\030\007 \001(\013" + + "2\032.google.protobuf.Timestamp\022\024\n\014content_" + + "type\030\010 \001(\t\022\014\n\004size\030\t \001(\003\0220\n\014time_created" + + "\030\n \001(\0132\032.google.protobuf.Timestamp\022\016\n\006cr" + + "c32c\030\013 \001(\t\022\027\n\017component_count\030\014 \001(\005\022\020\n\010m" + + "d5_hash\030\r \001(\t\022\014\n\004etag\030\016 \001(\t\022+\n\007updated\030\017" + + " \001(\0132\032.google.protobuf.Timestamp\022\025\n\rstor" + + "age_class\030\020 \001(\t\022\024\n\014kms_key_name\030\021 \001(\t\022>\n" + + "\032time_storage_class_updated\030\022 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\026\n\016temporary_hold\030" + + "\023 \001(\010\022=\n\031retention_expiration_time\030\024 \001(\013" + + "2\032.google.protobuf.Timestamp\022Q\n\010metadata" + + "\030\025 \003(\0132?.google.events.cloud.storage.v1." + + "StorageObjectData.MetadataEntry\022\030\n\020event" + + "_based_hold\030\035 \001(\010\022\014\n\004name\030\027 \001(\t\022\n\n\002id\030\030 " + + "\001(\t\022\016\n\006bucket\030\031 \001(\t\022\022\n\ngeneration\030\032 \001(\003\022" + + "a\n\023customer_encryption\030\034 \001(\0132D.google.ev" + + "ents.cloud.storage.v1.StorageObjectData." + + "CustomerEncryption\022\022\n\nmedia_link\030d \001(\t\022\021" + + "\n\tself_link\030e \001(\t\032F\n\022CustomerEncryption\022" + + "\034\n\024encryption_algorithm\030\001 \001(\t\022\022\n\nkey_sha" + + "256\030\002 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001B*\252\002\'Google.Events.Pro" + + "tobuf.Cloud.Storage.V1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_cloud_storage_v1_StorageObjectData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor, + new java.lang.String[] { "ContentEncoding", "ContentDisposition", "CacheControl", "ContentLanguage", "Metageneration", "TimeDeleted", "ContentType", "Size", "TimeCreated", "Crc32C", "ComponentCount", "Md5Hash", "Etag", "Updated", "StorageClass", "KmsKeyName", "TimeStorageClassUpdated", "TemporaryHold", "RetentionExpirationTime", "Metadata", "EventBasedHold", "Name", "Id", "Bucket", "Generation", "CustomerEncryption", "MediaLink", "SelfLink", }); + internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_descriptor = + internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_storage_v1_StorageObjectData_CustomerEncryption_descriptor, + new java.lang.String[] { "EncryptionAlgorithm", "KeySha256", }); + internal_static_google_events_cloud_storage_v1_StorageObjectData_MetadataEntry_descriptor = + internal_static_google_events_cloud_storage_v1_StorageObjectData_descriptor.getNestedTypes().get(1); + internal_static_google_events_cloud_storage_v1_StorageObjectData_MetadataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_storage_v1_StorageObjectData_MetadataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/google/events/firebase/v1/Data.java b/src/google/events/firebase/v1/Data.java new file mode 100644 index 00000000..29b76fd4 --- /dev/null +++ b/src/google/events/firebase/v1/Data.java @@ -0,0 +1,1500 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/firebase/v1/data.proto + +package google.events.firebase.v1; + +public final class Data { + private Data() {} + 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 DocumentEventDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.firebase.v1.DocumentEventData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The original data for the document.
+     * 
+ * + * .google.protobuf.Value data = 1; + * @return Whether the data field is set. + */ + boolean hasData(); + /** + *
+     * The original data for the document.
+     * 
+ * + * .google.protobuf.Value data = 1; + * @return The data. + */ + com.google.protobuf.Value getData(); + /** + *
+     * The original data for the document.
+     * 
+ * + * .google.protobuf.Value data = 1; + */ + com.google.protobuf.ValueOrBuilder getDataOrBuilder(); + + /** + *
+     * The change in the document data.
+     * 
+ * + * .google.protobuf.Value delta = 2; + * @return Whether the delta field is set. + */ + boolean hasDelta(); + /** + *
+     * The change in the document data.
+     * 
+ * + * .google.protobuf.Value delta = 2; + * @return The delta. + */ + com.google.protobuf.Value getDelta(); + /** + *
+     * The change in the document data.
+     * 
+ * + * .google.protobuf.Value delta = 2; + */ + com.google.protobuf.ValueOrBuilder getDeltaOrBuilder(); + + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + int getWildcardsCount(); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + boolean containsWildcards( + java.lang.String key); + /** + * Use {@link #getWildcardsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getWildcards(); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + java.util.Map + getWildcardsMap(); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + + java.lang.String getWildcardsOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + + java.lang.String getWildcardsOrThrow( + java.lang.String key); + } + /** + *
+   * The data within all Firebase Real Time Database document events.
+   * 
+ * + * Protobuf type {@code google.events.firebase.v1.DocumentEventData} + */ + public static final class DocumentEventData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.firebase.v1.DocumentEventData) + DocumentEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentEventData.newBuilder() to construct. + private DocumentEventData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DocumentEventData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DocumentEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DocumentEventData( + 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: { + com.google.protobuf.Value.Builder subBuilder = null; + if (data_ != null) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Value.Builder subBuilder = null; + if (delta_ != null) { + subBuilder = delta_.toBuilder(); + } + delta_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(delta_); + delta_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + wildcards_ = com.google.protobuf.MapField.newMapField( + WildcardsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + wildcards__ = input.readMessage( + WildcardsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + wildcards_.getMutableMap().put( + wildcards__.getKey(), wildcards__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 google.events.firebase.v1.Data.internal_static_google_events_firebase_v1_DocumentEventData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetWildcards(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.firebase.v1.Data.internal_static_google_events_firebase_v1_DocumentEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.firebase.v1.Data.DocumentEventData.class, google.events.firebase.v1.Data.DocumentEventData.Builder.class); + } + + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.Value data_; + /** + *
+     * The original data for the document.
+     * 
+ * + * .google.protobuf.Value data = 1; + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return data_ != null; + } + /** + *
+     * The original data for the document.
+     * 
+ * + * .google.protobuf.Value data = 1; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.Value getData() { + return data_ == null ? com.google.protobuf.Value.getDefaultInstance() : data_; + } + /** + *
+     * The original data for the document.
+     * 
+ * + * .google.protobuf.Value data = 1; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getDataOrBuilder() { + return getData(); + } + + public static final int DELTA_FIELD_NUMBER = 2; + private com.google.protobuf.Value delta_; + /** + *
+     * The change in the document data.
+     * 
+ * + * .google.protobuf.Value delta = 2; + * @return Whether the delta field is set. + */ + @java.lang.Override + public boolean hasDelta() { + return delta_ != null; + } + /** + *
+     * The change in the document data.
+     * 
+ * + * .google.protobuf.Value delta = 2; + * @return The delta. + */ + @java.lang.Override + public com.google.protobuf.Value getDelta() { + return delta_ == null ? com.google.protobuf.Value.getDefaultInstance() : delta_; + } + /** + *
+     * The change in the document data.
+     * 
+ * + * .google.protobuf.Value delta = 2; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getDeltaOrBuilder() { + return getDelta(); + } + + public static final int WILDCARDS_FIELD_NUMBER = 3; + private static final class WildcardsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.firebase.v1.Data.internal_static_google_events_firebase_v1_DocumentEventData_WildcardsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> wildcards_; + private com.google.protobuf.MapField + internalGetWildcards() { + if (wildcards_ == null) { + return com.google.protobuf.MapField.emptyMapField( + WildcardsDefaultEntryHolder.defaultEntry); + } + return wildcards_; + } + + public int getWildcardsCount() { + return internalGetWildcards().getMap().size(); + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + + @java.lang.Override + public boolean containsWildcards( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetWildcards().getMap().containsKey(key); + } + /** + * Use {@link #getWildcardsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getWildcards() { + return getWildcardsMap(); + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + @java.lang.Override + + public java.util.Map getWildcardsMap() { + return internalGetWildcards().getMap(); + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The matches from wildcards specified in the event subscription, to the
+     * values of those wildcards in the document name. For example,
+     * a subscription to
+     * `/projects/my_project/databases/(default)/documents/users/{username}`
+     * matching a document with name
+     * `/projects/my_project/databases/(default)/documents/users/marie`
+     * would result in a mapping of `'username': 'marie'`.
+     * 
+ * + * map<string, string> wildcards = 3; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().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 { + if (data_ != null) { + output.writeMessage(1, getData()); + } + if (delta_ != null) { + output.writeMessage(2, getDelta()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetWildcards(), + WildcardsDefaultEntryHolder.defaultEntry, + 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (data_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getData()); + } + if (delta_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDelta()); + } + for (java.util.Map.Entry entry + : internalGetWildcards().getMap().entrySet()) { + com.google.protobuf.MapEntry + wildcards__ = WildcardsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, wildcards__); + } + 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 google.events.firebase.v1.Data.DocumentEventData)) { + return super.equals(obj); + } + google.events.firebase.v1.Data.DocumentEventData other = (google.events.firebase.v1.Data.DocumentEventData) obj; + + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (hasDelta() != other.hasDelta()) return false; + if (hasDelta()) { + if (!getDelta() + .equals(other.getDelta())) return false; + } + if (!internalGetWildcards().equals( + other.internalGetWildcards())) 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 (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + if (hasDelta()) { + hash = (37 * hash) + DELTA_FIELD_NUMBER; + hash = (53 * hash) + getDelta().hashCode(); + } + if (!internalGetWildcards().getMap().isEmpty()) { + hash = (37 * hash) + WILDCARDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetWildcards().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.firebase.v1.Data.DocumentEventData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.firebase.v1.Data.DocumentEventData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.firebase.v1.Data.DocumentEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.firebase.v1.Data.DocumentEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.firebase.v1.Data.DocumentEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.firebase.v1.Data.DocumentEventData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.firebase.v1.Data.DocumentEventData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.firebase.v1.Data.DocumentEventData 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 google.events.firebase.v1.Data.DocumentEventData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.firebase.v1.Data.DocumentEventData 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 google.events.firebase.v1.Data.DocumentEventData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.firebase.v1.Data.DocumentEventData 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(google.events.firebase.v1.Data.DocumentEventData 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; + } + /** + *
+     * The data within all Firebase Real Time Database document events.
+     * 
+ * + * Protobuf type {@code google.events.firebase.v1.DocumentEventData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.events.firebase.v1.DocumentEventData) + google.events.firebase.v1.Data.DocumentEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.firebase.v1.Data.internal_static_google_events_firebase_v1_DocumentEventData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetWildcards(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableWildcards(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.firebase.v1.Data.internal_static_google_events_firebase_v1_DocumentEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.firebase.v1.Data.DocumentEventData.class, google.events.firebase.v1.Data.DocumentEventData.Builder.class); + } + + // Construct using google.events.firebase.v1.Data.DocumentEventData.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 (dataBuilder_ == null) { + data_ = null; + } else { + data_ = null; + dataBuilder_ = null; + } + if (deltaBuilder_ == null) { + delta_ = null; + } else { + delta_ = null; + deltaBuilder_ = null; + } + internalGetMutableWildcards().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.firebase.v1.Data.internal_static_google_events_firebase_v1_DocumentEventData_descriptor; + } + + @java.lang.Override + public google.events.firebase.v1.Data.DocumentEventData getDefaultInstanceForType() { + return google.events.firebase.v1.Data.DocumentEventData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.firebase.v1.Data.DocumentEventData build() { + google.events.firebase.v1.Data.DocumentEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.firebase.v1.Data.DocumentEventData buildPartial() { + google.events.firebase.v1.Data.DocumentEventData result = new google.events.firebase.v1.Data.DocumentEventData(this); + int from_bitField0_ = bitField0_; + if (dataBuilder_ == null) { + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + if (deltaBuilder_ == null) { + result.delta_ = delta_; + } else { + result.delta_ = deltaBuilder_.build(); + } + result.wildcards_ = internalGetWildcards(); + result.wildcards_.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 google.events.firebase.v1.Data.DocumentEventData) { + return mergeFrom((google.events.firebase.v1.Data.DocumentEventData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.firebase.v1.Data.DocumentEventData other) { + if (other == google.events.firebase.v1.Data.DocumentEventData.getDefaultInstance()) return this; + if (other.hasData()) { + mergeData(other.getData()); + } + if (other.hasDelta()) { + mergeDelta(other.getDelta()); + } + internalGetMutableWildcards().mergeFrom( + other.internalGetWildcards()); + 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 { + google.events.firebase.v1.Data.DocumentEventData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.firebase.v1.Data.DocumentEventData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Value data_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> dataBuilder_; + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + * @return Whether the data field is set. + */ + public boolean hasData() { + return dataBuilder_ != null || data_ != null; + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + * @return The data. + */ + public com.google.protobuf.Value getData() { + if (dataBuilder_ == null) { + return data_ == null ? com.google.protobuf.Value.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + public Builder setData(com.google.protobuf.Value value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + public Builder setData( + com.google.protobuf.Value.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + public Builder mergeData(com.google.protobuf.Value value) { + if (dataBuilder_ == null) { + if (data_ != null) { + data_ = + com.google.protobuf.Value.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + dataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = null; + onChanged(); + } else { + data_ = null; + dataBuilder_ = null; + } + + return this; + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + public com.google.protobuf.Value.Builder getDataBuilder() { + + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + public com.google.protobuf.ValueOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + com.google.protobuf.Value.getDefaultInstance() : data_; + } + } + /** + *
+       * The original data for the document.
+       * 
+ * + * .google.protobuf.Value data = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + + private com.google.protobuf.Value delta_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> deltaBuilder_; + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + * @return Whether the delta field is set. + */ + public boolean hasDelta() { + return deltaBuilder_ != null || delta_ != null; + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + * @return The delta. + */ + public com.google.protobuf.Value getDelta() { + if (deltaBuilder_ == null) { + return delta_ == null ? com.google.protobuf.Value.getDefaultInstance() : delta_; + } else { + return deltaBuilder_.getMessage(); + } + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + public Builder setDelta(com.google.protobuf.Value value) { + if (deltaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + delta_ = value; + onChanged(); + } else { + deltaBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + public Builder setDelta( + com.google.protobuf.Value.Builder builderForValue) { + if (deltaBuilder_ == null) { + delta_ = builderForValue.build(); + onChanged(); + } else { + deltaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + public Builder mergeDelta(com.google.protobuf.Value value) { + if (deltaBuilder_ == null) { + if (delta_ != null) { + delta_ = + com.google.protobuf.Value.newBuilder(delta_).mergeFrom(value).buildPartial(); + } else { + delta_ = value; + } + onChanged(); + } else { + deltaBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + public Builder clearDelta() { + if (deltaBuilder_ == null) { + delta_ = null; + onChanged(); + } else { + delta_ = null; + deltaBuilder_ = null; + } + + return this; + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + public com.google.protobuf.Value.Builder getDeltaBuilder() { + + onChanged(); + return getDeltaFieldBuilder().getBuilder(); + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + public com.google.protobuf.ValueOrBuilder getDeltaOrBuilder() { + if (deltaBuilder_ != null) { + return deltaBuilder_.getMessageOrBuilder(); + } else { + return delta_ == null ? + com.google.protobuf.Value.getDefaultInstance() : delta_; + } + } + /** + *
+       * The change in the document data.
+       * 
+ * + * .google.protobuf.Value delta = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> + getDeltaFieldBuilder() { + if (deltaBuilder_ == null) { + deltaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( + getDelta(), + getParentForChildren(), + isClean()); + delta_ = null; + } + return deltaBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> wildcards_; + private com.google.protobuf.MapField + internalGetWildcards() { + if (wildcards_ == null) { + return com.google.protobuf.MapField.emptyMapField( + WildcardsDefaultEntryHolder.defaultEntry); + } + return wildcards_; + } + private com.google.protobuf.MapField + internalGetMutableWildcards() { + onChanged();; + if (wildcards_ == null) { + wildcards_ = com.google.protobuf.MapField.newMapField( + WildcardsDefaultEntryHolder.defaultEntry); + } + if (!wildcards_.isMutable()) { + wildcards_ = wildcards_.copy(); + } + return wildcards_; + } + + public int getWildcardsCount() { + return internalGetWildcards().getMap().size(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + + @java.lang.Override + public boolean containsWildcards( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetWildcards().getMap().containsKey(key); + } + /** + * Use {@link #getWildcardsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getWildcards() { + return getWildcardsMap(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + @java.lang.Override + + public java.util.Map getWildcardsMap() { + return internalGetWildcards().getMap(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + @java.lang.Override + + public java.lang.String getWildcardsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetWildcards().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearWildcards() { + internalGetMutableWildcards().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + + public Builder removeWildcards( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableWildcards().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableWildcards() { + return internalGetMutableWildcards().getMutableMap(); + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + public Builder putWildcards( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableWildcards().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The matches from wildcards specified in the event subscription, to the
+       * values of those wildcards in the document name. For example,
+       * a subscription to
+       * `/projects/my_project/databases/(default)/documents/users/{username}`
+       * matching a document with name
+       * `/projects/my_project/databases/(default)/documents/users/marie`
+       * would result in a mapping of `'username': 'marie'`.
+       * 
+ * + * map<string, string> wildcards = 3; + */ + + public Builder putAllWildcards( + java.util.Map values) { + internalGetMutableWildcards().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:google.events.firebase.v1.DocumentEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.firebase.v1.DocumentEventData) + private static final google.events.firebase.v1.Data.DocumentEventData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.firebase.v1.Data.DocumentEventData(); + } + + public static google.events.firebase.v1.Data.DocumentEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DocumentEventData(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 google.events.firebase.v1.Data.DocumentEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_firebase_v1_DocumentEventData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_firebase_v1_DocumentEventData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_firebase_v1_DocumentEventData_WildcardsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_firebase_v1_DocumentEventData_WildcardsEntry_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$google/events/firebase/v1/data.proto\022\031" + + "google.events.firebase.v1\032\034google/protob" + + "uf/struct.proto\"\342\001\n\021DocumentEventData\022$\n" + + "\004data\030\001 \001(\0132\026.google.protobuf.Value\022%\n\005d" + + "elta\030\002 \001(\0132\026.google.protobuf.Value\022N\n\twi" + + "ldcards\030\003 \003(\0132;.google.events.firebase.v" + + "1.DocumentEventData.WildcardsEntry\0320\n\016Wi" + + "ldcardsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001B%\252\002\"Google.Events.Protobuf.Firebase" + + ".V1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_events_firebase_v1_DocumentEventData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_events_firebase_v1_DocumentEventData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_firebase_v1_DocumentEventData_descriptor, + new java.lang.String[] { "Data", "Delta", "Wildcards", }); + internal_static_google_events_firebase_v1_DocumentEventData_WildcardsEntry_descriptor = + internal_static_google_events_firebase_v1_DocumentEventData_descriptor.getNestedTypes().get(0); + internal_static_google_events_firebase_v1_DocumentEventData_WildcardsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_firebase_v1_DocumentEventData_WildcardsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +}