getWriteResultsList();
- /**
- *
- *
- *
- * The result of applying the writes.
- * This i-th write result corresponds to the i-th write in the
- * request.
- *
- *
- * repeated .google.firestore.v1beta1.WriteResult write_results = 1;
- */
- com.google.firestore.v1beta1.WriteResult getWriteResults(int index);
- /**
- *
- *
- *
- * The result of applying the writes.
- * This i-th write result corresponds to the i-th write in the
- * request.
- *
- *
- * repeated .google.firestore.v1beta1.WriteResult write_results = 1;
- */
- int getWriteResultsCount();
- /**
- *
- *
- *
- * The result of applying the writes.
- * This i-th write result corresponds to the i-th write in the
- * request.
- *
- *
- * repeated .google.firestore.v1beta1.WriteResult write_results = 1;
- */
- java.util.List extends com.google.firestore.v1beta1.WriteResultOrBuilder>
- getWriteResultsOrBuilderList();
- /**
- *
- *
- *
- * The result of applying the writes.
- * This i-th write result corresponds to the i-th write in the
- * request.
- *
- *
- * repeated .google.firestore.v1beta1.WriteResult write_results = 1;
- */
- com.google.firestore.v1beta1.WriteResultOrBuilder getWriteResultsOrBuilder(int index);
-
- /**
- *
- *
- *
- * The time at which the commit occurred.
- *
- *
- * .google.protobuf.Timestamp commit_time = 2;
- *
- * @return Whether the commitTime field is set.
- */
- boolean hasCommitTime();
- /**
- *
- *
- *
- * The time at which the commit occurred.
- *
- *
- * .google.protobuf.Timestamp commit_time = 2;
- *
- * @return The commitTime.
- */
- com.google.protobuf.Timestamp getCommitTime();
- /**
- *
- *
- *
- * The time at which the commit occurred.
- *
- *
- * .google.protobuf.Timestamp commit_time = 2;
- */
- com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder();
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java
deleted file mode 100644
index 2924408d4..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/common.proto
-
-package com.google.firestore.v1beta1;
-
-public final class CommonProto {
- private CommonProto() {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
- }
-
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_DocumentMask_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_DocumentMask_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_Precondition_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_Precondition_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_TransactionOptions_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_TransactionOptions_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadWrite_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadWrite_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadOnly_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadOnly_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/firestore/v1beta1/common.proto\022"
- + "\030google.firestore.v1beta1\032\037google/protob"
- + "uf/timestamp.proto\032\034google/api/annotatio"
- + "ns.proto\"#\n\014DocumentMask\022\023\n\013field_paths\030"
- + "\001 \003(\t\"e\n\014Precondition\022\020\n\006exists\030\001 \001(\010H\000\022"
- + "1\n\013update_time\030\002 \001(\0132\032.google.protobuf.T"
- + "imestampH\000B\020\n\016condition_type\"\263\002\n\022Transac"
- + "tionOptions\022J\n\tread_only\030\002 \001(\01325.google."
- + "firestore.v1beta1.TransactionOptions.Rea"
- + "dOnlyH\000\022L\n\nread_write\030\003 \001(\01326.google.fir"
- + "estore.v1beta1.TransactionOptions.ReadWr"
- + "iteH\000\032&\n\tReadWrite\022\031\n\021retry_transaction\030"
- + "\001 \001(\014\032S\n\010ReadOnly\022/\n\tread_time\030\002 \001(\0132\032.g"
- + "oogle.protobuf.TimestampH\000B\026\n\024consistenc"
- + "y_selectorB\006\n\004modeB\335\001\n\034com.google.firest"
- + "ore.v1beta1B\013CommonProtoP\001ZAgoogle.golan"
- + "g.org/genproto/googleapis/firestore/v1be"
- + "ta1;firestore\242\002\004GCFS\252\002\036Google.Cloud.Fire"
- + "store.V1Beta1\312\002\036Google\\Cloud\\Firestore\\V"
- + "1beta1\352\002!Google::Cloud::Firestore::V1bet"
- + "a1b\006proto3"
- };
- descriptor =
- com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
- descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.TimestampProto.getDescriptor(),
- com.google.api.AnnotationsProto.getDescriptor(),
- });
- internal_static_google_firestore_v1beta1_DocumentMask_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_firestore_v1beta1_DocumentMask_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_DocumentMask_descriptor,
- new java.lang.String[] {
- "FieldPaths",
- });
- internal_static_google_firestore_v1beta1_Precondition_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_firestore_v1beta1_Precondition_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_Precondition_descriptor,
- new java.lang.String[] {
- "Exists", "UpdateTime", "ConditionType",
- });
- internal_static_google_firestore_v1beta1_TransactionOptions_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_firestore_v1beta1_TransactionOptions_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_TransactionOptions_descriptor,
- new java.lang.String[] {
- "ReadOnly", "ReadWrite", "Mode",
- });
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadWrite_descriptor =
- internal_static_google_firestore_v1beta1_TransactionOptions_descriptor
- .getNestedTypes()
- .get(0);
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadWrite_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadWrite_descriptor,
- new java.lang.String[] {
- "RetryTransaction",
- });
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadOnly_descriptor =
- internal_static_google_firestore_v1beta1_TransactionOptions_descriptor
- .getNestedTypes()
- .get(1);
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadOnly_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_TransactionOptions_ReadOnly_descriptor,
- new java.lang.String[] {
- "ReadTime", "ConsistencySelector",
- });
- com.google.protobuf.TimestampProto.getDescriptor();
- com.google.api.AnnotationsProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java
deleted file mode 100644
index 154c9bc44..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java
+++ /dev/null
@@ -1,1615 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/firestore.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.CreateDocumentRequest}
- */
-public final class CreateDocumentRequest extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.CreateDocumentRequest)
- CreateDocumentRequestOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use CreateDocumentRequest.newBuilder() to construct.
- private CreateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private CreateDocumentRequest() {
- parent_ = "";
- collectionId_ = "";
- documentId_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new CreateDocumentRequest();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return this.unknownFields;
- }
-
- private CreateDocumentRequest(
- 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();
-
- parent_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- collectionId_ = s;
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- documentId_ = s;
- break;
- }
- case 34:
- {
- com.google.firestore.v1beta1.Document.Builder subBuilder = null;
- if (document_ != null) {
- subBuilder = document_.toBuilder();
- }
- document_ =
- input.readMessage(
- com.google.firestore.v1beta1.Document.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(document_);
- document_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 42:
- {
- com.google.firestore.v1beta1.DocumentMask.Builder subBuilder = null;
- if (mask_ != null) {
- subBuilder = mask_.toBuilder();
- }
- mask_ =
- input.readMessage(
- com.google.firestore.v1beta1.DocumentMask.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(mask_);
- mask_ = 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 com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_CreateDocumentRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_CreateDocumentRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.CreateDocumentRequest.class,
- com.google.firestore.v1beta1.CreateDocumentRequest.Builder.class);
- }
-
- public static final int PARENT_FIELD_NUMBER = 1;
- private volatile java.lang.Object parent_;
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The parent.
- */
- @java.lang.Override
- public java.lang.String getParent() {
- java.lang.Object ref = parent_;
- 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();
- parent_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for parent.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getParentBytes() {
- java.lang.Object ref = parent_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- parent_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int COLLECTION_ID_FIELD_NUMBER = 2;
- private volatile java.lang.Object collectionId_;
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The collectionId.
- */
- @java.lang.Override
- public java.lang.String getCollectionId() {
- java.lang.Object ref = collectionId_;
- 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();
- collectionId_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for collectionId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getCollectionIdBytes() {
- java.lang.Object ref = collectionId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- collectionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DOCUMENT_ID_FIELD_NUMBER = 3;
- private volatile java.lang.Object documentId_;
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return The documentId.
- */
- @java.lang.Override
- public java.lang.String getDocumentId() {
- java.lang.Object ref = documentId_;
- 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();
- documentId_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return The bytes for documentId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getDocumentIdBytes() {
- java.lang.Object ref = documentId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- documentId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DOCUMENT_FIELD_NUMBER = 4;
- private com.google.firestore.v1beta1.Document document_;
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- *
- * @return Whether the document field is set.
- */
- @java.lang.Override
- public boolean hasDocument() {
- return document_ != null;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- *
- * @return The document.
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.Document getDocument() {
- return document_ == null
- ? com.google.firestore.v1beta1.Document.getDefaultInstance()
- : document_;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() {
- return getDocument();
- }
-
- public static final int MASK_FIELD_NUMBER = 5;
- private com.google.firestore.v1beta1.DocumentMask mask_;
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- *
- * @return Whether the mask field is set.
- */
- @java.lang.Override
- public boolean hasMask() {
- return mask_ != null;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- *
- * @return The mask.
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentMask getMask() {
- return mask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() : mask_;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() {
- return getMask();
- }
-
- 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 (!getParentBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
- }
- if (!getCollectionIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collectionId_);
- }
- if (!getDocumentIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, documentId_);
- }
- if (document_ != null) {
- output.writeMessage(4, getDocument());
- }
- if (mask_ != null) {
- output.writeMessage(5, getMask());
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getParentBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
- }
- if (!getCollectionIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collectionId_);
- }
- if (!getDocumentIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, documentId_);
- }
- if (document_ != null) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDocument());
- }
- if (mask_ != null) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMask());
- }
- 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 com.google.firestore.v1beta1.CreateDocumentRequest)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.CreateDocumentRequest other =
- (com.google.firestore.v1beta1.CreateDocumentRequest) obj;
-
- if (!getParent().equals(other.getParent())) return false;
- if (!getCollectionId().equals(other.getCollectionId())) return false;
- if (!getDocumentId().equals(other.getDocumentId())) return false;
- if (hasDocument() != other.hasDocument()) return false;
- if (hasDocument()) {
- if (!getDocument().equals(other.getDocument())) return false;
- }
- if (hasMask() != other.hasMask()) return false;
- if (hasMask()) {
- if (!getMask().equals(other.getMask())) 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) + PARENT_FIELD_NUMBER;
- hash = (53 * hash) + getParent().hashCode();
- hash = (37 * hash) + COLLECTION_ID_FIELD_NUMBER;
- hash = (53 * hash) + getCollectionId().hashCode();
- hash = (37 * hash) + DOCUMENT_ID_FIELD_NUMBER;
- hash = (53 * hash) + getDocumentId().hashCode();
- if (hasDocument()) {
- hash = (37 * hash) + DOCUMENT_FIELD_NUMBER;
- hash = (53 * hash) + getDocument().hashCode();
- }
- if (hasMask()) {
- hash = (37 * hash) + MASK_FIELD_NUMBER;
- hash = (53 * hash) + getMask().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest 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 com.google.firestore.v1beta1.CreateDocumentRequest parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest 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 com.google.firestore.v1beta1.CreateDocumentRequest parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest 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(com.google.firestore.v1beta1.CreateDocumentRequest 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 request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.CreateDocumentRequest}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.CreateDocumentRequest)
- com.google.firestore.v1beta1.CreateDocumentRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_CreateDocumentRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_CreateDocumentRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.CreateDocumentRequest.class,
- com.google.firestore.v1beta1.CreateDocumentRequest.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.CreateDocumentRequest.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();
- parent_ = "";
-
- collectionId_ = "";
-
- documentId_ = "";
-
- if (documentBuilder_ == null) {
- document_ = null;
- } else {
- document_ = null;
- documentBuilder_ = null;
- }
- if (maskBuilder_ == null) {
- mask_ = null;
- } else {
- mask_ = null;
- maskBuilder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_CreateDocumentRequest_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.CreateDocumentRequest getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.CreateDocumentRequest.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.CreateDocumentRequest build() {
- com.google.firestore.v1beta1.CreateDocumentRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.CreateDocumentRequest buildPartial() {
- com.google.firestore.v1beta1.CreateDocumentRequest result =
- new com.google.firestore.v1beta1.CreateDocumentRequest(this);
- result.parent_ = parent_;
- result.collectionId_ = collectionId_;
- result.documentId_ = documentId_;
- if (documentBuilder_ == null) {
- result.document_ = document_;
- } else {
- result.document_ = documentBuilder_.build();
- }
- if (maskBuilder_ == null) {
- result.mask_ = mask_;
- } else {
- result.mask_ = maskBuilder_.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 com.google.firestore.v1beta1.CreateDocumentRequest) {
- return mergeFrom((com.google.firestore.v1beta1.CreateDocumentRequest) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.CreateDocumentRequest other) {
- if (other == com.google.firestore.v1beta1.CreateDocumentRequest.getDefaultInstance())
- return this;
- if (!other.getParent().isEmpty()) {
- parent_ = other.parent_;
- onChanged();
- }
- if (!other.getCollectionId().isEmpty()) {
- collectionId_ = other.collectionId_;
- onChanged();
- }
- if (!other.getDocumentId().isEmpty()) {
- documentId_ = other.documentId_;
- onChanged();
- }
- if (other.hasDocument()) {
- mergeDocument(other.getDocument());
- }
- if (other.hasMask()) {
- mergeMask(other.getMask());
- }
- 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 {
- com.google.firestore.v1beta1.CreateDocumentRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.firestore.v1beta1.CreateDocumentRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object parent_ = "";
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The parent.
- */
- public java.lang.String getParent() {
- java.lang.Object ref = parent_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- parent_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for parent.
- */
- public com.google.protobuf.ByteString getParentBytes() {
- java.lang.Object ref = parent_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- parent_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @param value The parent to set.
- * @return This builder for chaining.
- */
- public Builder setParent(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- parent_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return This builder for chaining.
- */
- public Builder clearParent() {
-
- parent_ = getDefaultInstance().getParent();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @param value The bytes for parent to set.
- * @return This builder for chaining.
- */
- public Builder setParentBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- parent_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object collectionId_ = "";
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The collectionId.
- */
- public java.lang.String getCollectionId() {
- java.lang.Object ref = collectionId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- collectionId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for collectionId.
- */
- public com.google.protobuf.ByteString getCollectionIdBytes() {
- java.lang.Object ref = collectionId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- collectionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @param value The collectionId to set.
- * @return This builder for chaining.
- */
- public Builder setCollectionId(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- collectionId_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return This builder for chaining.
- */
- public Builder clearCollectionId() {
-
- collectionId_ = getDefaultInstance().getCollectionId();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @param value The bytes for collectionId to set.
- * @return This builder for chaining.
- */
- public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- collectionId_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object documentId_ = "";
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return The documentId.
- */
- public java.lang.String getDocumentId() {
- java.lang.Object ref = documentId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- documentId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return The bytes for documentId.
- */
- public com.google.protobuf.ByteString getDocumentIdBytes() {
- java.lang.Object ref = documentId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- documentId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @param value The documentId to set.
- * @return This builder for chaining.
- */
- public Builder setDocumentId(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- documentId_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearDocumentId() {
-
- documentId_ = getDefaultInstance().getDocumentId();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @param value The bytes for documentId to set.
- * @return This builder for chaining.
- */
- public Builder setDocumentIdBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- documentId_ = value;
- onChanged();
- return this;
- }
-
- private com.google.firestore.v1beta1.Document document_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Document,
- com.google.firestore.v1beta1.Document.Builder,
- com.google.firestore.v1beta1.DocumentOrBuilder>
- documentBuilder_;
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- *
- * @return Whether the document field is set.
- */
- public boolean hasDocument() {
- return documentBuilder_ != null || document_ != null;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- *
- * @return The document.
- */
- public com.google.firestore.v1beta1.Document getDocument() {
- if (documentBuilder_ == null) {
- return document_ == null
- ? com.google.firestore.v1beta1.Document.getDefaultInstance()
- : document_;
- } else {
- return documentBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- public Builder setDocument(com.google.firestore.v1beta1.Document value) {
- if (documentBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- document_ = value;
- onChanged();
- } else {
- documentBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- public Builder setDocument(com.google.firestore.v1beta1.Document.Builder builderForValue) {
- if (documentBuilder_ == null) {
- document_ = builderForValue.build();
- onChanged();
- } else {
- documentBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- public Builder mergeDocument(com.google.firestore.v1beta1.Document value) {
- if (documentBuilder_ == null) {
- if (document_ != null) {
- document_ =
- com.google.firestore.v1beta1.Document.newBuilder(document_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- document_ = value;
- }
- onChanged();
- } else {
- documentBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- public Builder clearDocument() {
- if (documentBuilder_ == null) {
- document_ = null;
- onChanged();
- } else {
- document_ = null;
- documentBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- public com.google.firestore.v1beta1.Document.Builder getDocumentBuilder() {
-
- onChanged();
- return getDocumentFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() {
- if (documentBuilder_ != null) {
- return documentBuilder_.getMessageOrBuilder();
- } else {
- return document_ == null
- ? com.google.firestore.v1beta1.Document.getDefaultInstance()
- : document_;
- }
- }
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Document,
- com.google.firestore.v1beta1.Document.Builder,
- com.google.firestore.v1beta1.DocumentOrBuilder>
- getDocumentFieldBuilder() {
- if (documentBuilder_ == null) {
- documentBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Document,
- com.google.firestore.v1beta1.Document.Builder,
- com.google.firestore.v1beta1.DocumentOrBuilder>(
- getDocument(), getParentForChildren(), isClean());
- document_ = null;
- }
- return documentBuilder_;
- }
-
- private com.google.firestore.v1beta1.DocumentMask mask_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.DocumentMask,
- com.google.firestore.v1beta1.DocumentMask.Builder,
- com.google.firestore.v1beta1.DocumentMaskOrBuilder>
- maskBuilder_;
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- *
- * @return Whether the mask field is set.
- */
- public boolean hasMask() {
- return maskBuilder_ != null || mask_ != null;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- *
- * @return The mask.
- */
- public com.google.firestore.v1beta1.DocumentMask getMask() {
- if (maskBuilder_ == null) {
- return mask_ == null
- ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance()
- : mask_;
- } else {
- return maskBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- public Builder setMask(com.google.firestore.v1beta1.DocumentMask value) {
- if (maskBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- mask_ = value;
- onChanged();
- } else {
- maskBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- public Builder setMask(com.google.firestore.v1beta1.DocumentMask.Builder builderForValue) {
- if (maskBuilder_ == null) {
- mask_ = builderForValue.build();
- onChanged();
- } else {
- maskBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- public Builder mergeMask(com.google.firestore.v1beta1.DocumentMask value) {
- if (maskBuilder_ == null) {
- if (mask_ != null) {
- mask_ =
- com.google.firestore.v1beta1.DocumentMask.newBuilder(mask_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- mask_ = value;
- }
- onChanged();
- } else {
- maskBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- public Builder clearMask() {
- if (maskBuilder_ == null) {
- mask_ = null;
- onChanged();
- } else {
- mask_ = null;
- maskBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- public com.google.firestore.v1beta1.DocumentMask.Builder getMaskBuilder() {
-
- onChanged();
- return getMaskFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() {
- if (maskBuilder_ != null) {
- return maskBuilder_.getMessageOrBuilder();
- } else {
- return mask_ == null
- ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance()
- : mask_;
- }
- }
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.DocumentMask,
- com.google.firestore.v1beta1.DocumentMask.Builder,
- com.google.firestore.v1beta1.DocumentMaskOrBuilder>
- getMaskFieldBuilder() {
- if (maskBuilder_ == null) {
- maskBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.DocumentMask,
- com.google.firestore.v1beta1.DocumentMask.Builder,
- com.google.firestore.v1beta1.DocumentMaskOrBuilder>(
- getMask(), getParentForChildren(), isClean());
- mask_ = null;
- }
- return maskBuilder_;
- }
-
- @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.firestore.v1beta1.CreateDocumentRequest)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.CreateDocumentRequest)
- private static final com.google.firestore.v1beta1.CreateDocumentRequest DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.CreateDocumentRequest();
- }
-
- public static com.google.firestore.v1beta1.CreateDocumentRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public CreateDocumentRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateDocumentRequest(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 com.google.firestore.v1beta1.CreateDocumentRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequestOrBuilder.java
deleted file mode 100644
index 796ea6a99..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequestOrBuilder.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/firestore.proto
-
-package com.google.firestore.v1beta1;
-
-public interface CreateDocumentRequestOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.CreateDocumentRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The parent.
- */
- java.lang.String getParent();
- /**
- *
- *
- *
- * Required. The parent resource. For example:
- * `projects/{project_id}/databases/{database_id}/documents` or
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
- *
- *
- * string parent = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for parent.
- */
- com.google.protobuf.ByteString getParentBytes();
-
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The collectionId.
- */
- java.lang.String getCollectionId();
- /**
- *
- *
- *
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
- *
- *
- * string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for collectionId.
- */
- com.google.protobuf.ByteString getCollectionIdBytes();
-
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return The documentId.
- */
- java.lang.String getDocumentId();
- /**
- *
- *
- *
- * The client-assigned document ID to use for this document.
- * Optional. If not specified, an ID will be assigned by the service.
- *
- *
- * string document_id = 3;
- *
- * @return The bytes for documentId.
- */
- com.google.protobuf.ByteString getDocumentIdBytes();
-
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- *
- * @return Whether the document field is set.
- */
- boolean hasDocument();
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- *
- * @return The document.
- */
- com.google.firestore.v1beta1.Document getDocument();
- /**
- *
- *
- *
- * Required. The document to create. `name` must not be set.
- *
- *
- *
- * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
- *
- */
- com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder();
-
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- *
- * @return Whether the mask field is set.
- */
- boolean hasMask();
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- *
- * @return The mask.
- */
- com.google.firestore.v1beta1.DocumentMask getMask();
- /**
- *
- *
- *
- * The fields to return. If not set, returns all fields.
- * If the document has a field that is not present in this mask, that field
- * will not be returned in the response.
- *
- *
- * .google.firestore.v1beta1.DocumentMask mask = 5;
- */
- com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder();
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java
deleted file mode 100644
index 4c7f9e5b7..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java
+++ /dev/null
@@ -1,1083 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/query.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * A position in a query result set.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.Cursor}
- */
-public final class Cursor extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.Cursor)
- CursorOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Cursor.newBuilder() to construct.
- private Cursor(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Cursor() {
- values_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Cursor();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return this.unknownFields;
- }
-
- private Cursor(
- 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(
- com.google.firestore.v1beta1.Value.parser(), extensionRegistry));
- break;
- }
- case 16:
- {
- before_ = 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 {
- 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 com.google.firestore.v1beta1.QueryProto
- .internal_static_google_firestore_v1beta1_Cursor_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.QueryProto
- .internal_static_google_firestore_v1beta1_Cursor_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.Cursor.class,
- com.google.firestore.v1beta1.Cursor.Builder.class);
- }
-
- public static final int VALUES_FIELD_NUMBER = 1;
- private java.util.List values_;
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- @java.lang.Override
- public java.util.List getValuesList() {
- return values_;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.firestore.v1beta1.ValueOrBuilder>
- getValuesOrBuilderList() {
- return values_;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- @java.lang.Override
- public int getValuesCount() {
- return values_.size();
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.Value getValues(int index) {
- return values_.get(index);
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.ValueOrBuilder getValuesOrBuilder(int index) {
- return values_.get(index);
- }
-
- public static final int BEFORE_FIELD_NUMBER = 2;
- private boolean before_;
- /**
- *
- *
- *
- * If the position is just before or just after the given values, relative
- * to the sort order defined by the query.
- *
- *
- * bool before = 2;
- *
- * @return The before.
- */
- @java.lang.Override
- public boolean getBefore() {
- return before_;
- }
-
- 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));
- }
- if (before_ != false) {
- output.writeBool(2, before_);
- }
- 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));
- }
- if (before_ != false) {
- size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, before_);
- }
- 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 com.google.firestore.v1beta1.Cursor)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.Cursor other = (com.google.firestore.v1beta1.Cursor) obj;
-
- if (!getValuesList().equals(other.getValuesList())) return false;
- if (getBefore() != other.getBefore()) 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 = (37 * hash) + BEFORE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBefore());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.Cursor parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.Cursor 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 com.google.firestore.v1beta1.Cursor parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.Cursor 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 com.google.firestore.v1beta1.Cursor parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.Cursor 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(com.google.firestore.v1beta1.Cursor 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 position in a query result set.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.Cursor}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.Cursor)
- com.google.firestore.v1beta1.CursorOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.QueryProto
- .internal_static_google_firestore_v1beta1_Cursor_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.QueryProto
- .internal_static_google_firestore_v1beta1_Cursor_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.Cursor.class,
- com.google.firestore.v1beta1.Cursor.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.Cursor.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();
- }
- before_ = false;
-
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.firestore.v1beta1.QueryProto
- .internal_static_google_firestore_v1beta1_Cursor_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.Cursor getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.Cursor.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.Cursor build() {
- com.google.firestore.v1beta1.Cursor result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.Cursor buildPartial() {
- com.google.firestore.v1beta1.Cursor result = new com.google.firestore.v1beta1.Cursor(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();
- }
- result.before_ = before_;
- 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 com.google.firestore.v1beta1.Cursor) {
- return mergeFrom((com.google.firestore.v1beta1.Cursor) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.Cursor other) {
- if (other == com.google.firestore.v1beta1.Cursor.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_);
- }
- }
- }
- if (other.getBefore() != false) {
- setBefore(other.getBefore());
- }
- 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 {
- com.google.firestore.v1beta1.Cursor parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.firestore.v1beta1.Cursor) 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<
- com.google.firestore.v1beta1.Value,
- com.google.firestore.v1beta1.Value.Builder,
- com.google.firestore.v1beta1.ValueOrBuilder>
- valuesBuilder_;
-
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public java.util.List getValuesList() {
- if (valuesBuilder_ == null) {
- return java.util.Collections.unmodifiableList(values_);
- } else {
- return valuesBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public int getValuesCount() {
- if (valuesBuilder_ == null) {
- return values_.size();
- } else {
- return valuesBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public com.google.firestore.v1beta1.Value getValues(int index) {
- if (valuesBuilder_ == null) {
- return values_.get(index);
- } else {
- return valuesBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder setValues(int index, com.google.firestore.v1beta1.Value value) {
- if (valuesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureValuesIsMutable();
- values_.set(index, value);
- onChanged();
- } else {
- valuesBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder setValues(
- int index, com.google.firestore.v1beta1.Value.Builder builderForValue) {
- if (valuesBuilder_ == null) {
- ensureValuesIsMutable();
- values_.set(index, builderForValue.build());
- onChanged();
- } else {
- valuesBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder addValues(com.google.firestore.v1beta1.Value value) {
- if (valuesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureValuesIsMutable();
- values_.add(value);
- onChanged();
- } else {
- valuesBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder addValues(int index, com.google.firestore.v1beta1.Value value) {
- if (valuesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureValuesIsMutable();
- values_.add(index, value);
- onChanged();
- } else {
- valuesBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder addValues(com.google.firestore.v1beta1.Value.Builder builderForValue) {
- if (valuesBuilder_ == null) {
- ensureValuesIsMutable();
- values_.add(builderForValue.build());
- onChanged();
- } else {
- valuesBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder addValues(
- int index, com.google.firestore.v1beta1.Value.Builder builderForValue) {
- if (valuesBuilder_ == null) {
- ensureValuesIsMutable();
- values_.add(index, builderForValue.build());
- onChanged();
- } else {
- valuesBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder addAllValues(
- java.lang.Iterable extends com.google.firestore.v1beta1.Value> values) {
- if (valuesBuilder_ == null) {
- ensureValuesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_);
- onChanged();
- } else {
- valuesBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder clearValues() {
- if (valuesBuilder_ == null) {
- values_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- valuesBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public Builder removeValues(int index) {
- if (valuesBuilder_ == null) {
- ensureValuesIsMutable();
- values_.remove(index);
- onChanged();
- } else {
- valuesBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public com.google.firestore.v1beta1.Value.Builder getValuesBuilder(int index) {
- return getValuesFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public com.google.firestore.v1beta1.ValueOrBuilder getValuesOrBuilder(int index) {
- if (valuesBuilder_ == null) {
- return values_.get(index);
- } else {
- return valuesBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public java.util.List extends com.google.firestore.v1beta1.ValueOrBuilder>
- getValuesOrBuilderList() {
- if (valuesBuilder_ != null) {
- return valuesBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(values_);
- }
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public com.google.firestore.v1beta1.Value.Builder addValuesBuilder() {
- return getValuesFieldBuilder()
- .addBuilder(com.google.firestore.v1beta1.Value.getDefaultInstance());
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public com.google.firestore.v1beta1.Value.Builder addValuesBuilder(int index) {
- return getValuesFieldBuilder()
- .addBuilder(index, com.google.firestore.v1beta1.Value.getDefaultInstance());
- }
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- public java.util.List getValuesBuilderList() {
- return getValuesFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.firestore.v1beta1.Value,
- com.google.firestore.v1beta1.Value.Builder,
- com.google.firestore.v1beta1.ValueOrBuilder>
- getValuesFieldBuilder() {
- if (valuesBuilder_ == null) {
- valuesBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.firestore.v1beta1.Value,
- com.google.firestore.v1beta1.Value.Builder,
- com.google.firestore.v1beta1.ValueOrBuilder>(
- values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
- values_ = null;
- }
- return valuesBuilder_;
- }
-
- private boolean before_;
- /**
- *
- *
- *
- * If the position is just before or just after the given values, relative
- * to the sort order defined by the query.
- *
- *
- * bool before = 2;
- *
- * @return The before.
- */
- @java.lang.Override
- public boolean getBefore() {
- return before_;
- }
- /**
- *
- *
- *
- * If the position is just before or just after the given values, relative
- * to the sort order defined by the query.
- *
- *
- * bool before = 2;
- *
- * @param value The before to set.
- * @return This builder for chaining.
- */
- public Builder setBefore(boolean value) {
-
- before_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If the position is just before or just after the given values, relative
- * to the sort order defined by the query.
- *
- *
- * bool before = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearBefore() {
-
- before_ = 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.firestore.v1beta1.Cursor)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Cursor)
- private static final com.google.firestore.v1beta1.Cursor DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.Cursor();
- }
-
- public static com.google.firestore.v1beta1.Cursor getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Cursor parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Cursor(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 com.google.firestore.v1beta1.Cursor getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CursorOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CursorOrBuilder.java
deleted file mode 100644
index 2f815ae93..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CursorOrBuilder.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/query.proto
-
-package com.google.firestore.v1beta1;
-
-public interface CursorOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.Cursor)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- java.util.List getValuesList();
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- com.google.firestore.v1beta1.Value getValues(int index);
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- int getValuesCount();
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- java.util.List extends com.google.firestore.v1beta1.ValueOrBuilder> getValuesOrBuilderList();
- /**
- *
- *
- *
- * The values that represent a position, in the order they appear in
- * the order by clause of a query.
- * Can contain fewer values than specified in the order by clause.
- *
- *
- * repeated .google.firestore.v1beta1.Value values = 1;
- */
- com.google.firestore.v1beta1.ValueOrBuilder getValuesOrBuilder(int index);
-
- /**
- *
- *
- *
- * If the position is just before or just after the given values, relative
- * to the sort order defined by the query.
- *
- *
- * bool before = 2;
- *
- * @return The before.
- */
- boolean getBefore();
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DatabaseRootName.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DatabaseRootName.java
deleted file mode 100644
index c0118d62f..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DatabaseRootName.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firestore.v1beta1;
-
-import com.google.api.pathtemplate.PathTemplate;
-import com.google.api.resourcenames.ResourceName;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public class DatabaseRootName implements ResourceName {
-
- private static final PathTemplate PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding("projects/{project}/databases/{database}");
-
- private volatile Map fieldValuesMap;
-
- private final String project;
- private final String database;
-
- public String getProject() {
- return project;
- }
-
- public String getDatabase() {
- return database;
- }
-
- public static Builder newBuilder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- private DatabaseRootName(Builder builder) {
- project = Preconditions.checkNotNull(builder.getProject());
- database = Preconditions.checkNotNull(builder.getDatabase());
- }
-
- public static DatabaseRootName of(String project, String database) {
- return newBuilder().setProject(project).setDatabase(database).build();
- }
-
- public static String format(String project, String database) {
- return newBuilder().setProject(project).setDatabase(database).build().toString();
- }
-
- public static DatabaseRootName parse(String formattedString) {
- if (formattedString.isEmpty()) {
- return null;
- }
- Map matchMap =
- PATH_TEMPLATE.validatedMatch(
- formattedString, "DatabaseRootName.parse: formattedString not in valid format");
- return of(matchMap.get("project"), matchMap.get("database"));
- }
-
- public static List parseList(List formattedStrings) {
- List list = new ArrayList<>(formattedStrings.size());
- for (String formattedString : formattedStrings) {
- list.add(parse(formattedString));
- }
- return list;
- }
-
- public static List toStringList(List values) {
- List list = new ArrayList(values.size());
- for (DatabaseRootName value : values) {
- if (value == null) {
- list.add("");
- } else {
- list.add(value.toString());
- }
- }
- return list;
- }
-
- public static boolean isParsableFrom(String formattedString) {
- return PATH_TEMPLATE.matches(formattedString);
- }
-
- public Map getFieldValuesMap() {
- if (fieldValuesMap == null) {
- synchronized (this) {
- if (fieldValuesMap == null) {
- ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
- fieldMapBuilder.put("project", project);
- fieldMapBuilder.put("database", database);
- fieldValuesMap = fieldMapBuilder.build();
- }
- }
- }
- return fieldValuesMap;
- }
-
- public String getFieldValue(String fieldName) {
- return getFieldValuesMap().get(fieldName);
- }
-
- @Override
- public String toString() {
- return PATH_TEMPLATE.instantiate("project", project, "database", database);
- }
-
- /** Builder for DatabaseRootName. */
- public static class Builder {
-
- private String project;
- private String database;
-
- public String getProject() {
- return project;
- }
-
- public String getDatabase() {
- return database;
- }
-
- public Builder setProject(String project) {
- this.project = project;
- return this;
- }
-
- public Builder setDatabase(String database) {
- this.database = database;
- return this;
- }
-
- private Builder() {}
-
- private Builder(DatabaseRootName databaseRootName) {
- project = databaseRootName.project;
- database = databaseRootName.database;
- }
-
- public DatabaseRootName build() {
- return new DatabaseRootName(this);
- }
- }
-
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (o instanceof DatabaseRootName) {
- DatabaseRootName that = (DatabaseRootName) o;
- return (this.project.equals(that.project)) && (this.database.equals(that.database));
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- int h = 1;
- h *= 1000003;
- h ^= project.hashCode();
- h *= 1000003;
- h ^= database.hashCode();
- return h;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java
deleted file mode 100644
index ef5b3f452..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java
+++ /dev/null
@@ -1,933 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/firestore.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DeleteDocumentRequest}
- */
-public final class DeleteDocumentRequest extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.DeleteDocumentRequest)
- DeleteDocumentRequestOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DeleteDocumentRequest.newBuilder() to construct.
- private DeleteDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private DeleteDocumentRequest() {
- name_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new DeleteDocumentRequest();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return this.unknownFields;
- }
-
- private DeleteDocumentRequest(
- 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();
-
- name_ = s;
- break;
- }
- case 18:
- {
- com.google.firestore.v1beta1.Precondition.Builder subBuilder = null;
- if (currentDocument_ != null) {
- subBuilder = currentDocument_.toBuilder();
- }
- currentDocument_ =
- input.readMessage(
- com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(currentDocument_);
- currentDocument_ = 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 com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_DeleteDocumentRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_DeleteDocumentRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DeleteDocumentRequest.class,
- com.google.firestore.v1beta1.DeleteDocumentRequest.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @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;
- }
- }
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @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 CURRENT_DOCUMENT_FIELD_NUMBER = 2;
- private com.google.firestore.v1beta1.Precondition currentDocument_;
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- *
- * @return Whether the currentDocument field is set.
- */
- @java.lang.Override
- public boolean hasCurrentDocument() {
- return currentDocument_ != null;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- *
- * @return The currentDocument.
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.Precondition getCurrentDocument() {
- return currentDocument_ == null
- ? com.google.firestore.v1beta1.Precondition.getDefaultInstance()
- : currentDocument_;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder() {
- return getCurrentDocument();
- }
-
- 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_);
- }
- if (currentDocument_ != null) {
- output.writeMessage(2, getCurrentDocument());
- }
- 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_);
- }
- if (currentDocument_ != null) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCurrentDocument());
- }
- 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 com.google.firestore.v1beta1.DeleteDocumentRequest)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.DeleteDocumentRequest other =
- (com.google.firestore.v1beta1.DeleteDocumentRequest) obj;
-
- if (!getName().equals(other.getName())) return false;
- if (hasCurrentDocument() != other.hasCurrentDocument()) return false;
- if (hasCurrentDocument()) {
- if (!getCurrentDocument().equals(other.getCurrentDocument())) 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 (hasCurrentDocument()) {
- hash = (37 * hash) + CURRENT_DOCUMENT_FIELD_NUMBER;
- hash = (53 * hash) + getCurrentDocument().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest 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 com.google.firestore.v1beta1.DeleteDocumentRequest parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest 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 com.google.firestore.v1beta1.DeleteDocumentRequest parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest 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(com.google.firestore.v1beta1.DeleteDocumentRequest 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 request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DeleteDocumentRequest}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.DeleteDocumentRequest)
- com.google.firestore.v1beta1.DeleteDocumentRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_DeleteDocumentRequest_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_DeleteDocumentRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DeleteDocumentRequest.class,
- com.google.firestore.v1beta1.DeleteDocumentRequest.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.DeleteDocumentRequest.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_ = "";
-
- if (currentDocumentBuilder_ == null) {
- currentDocument_ = null;
- } else {
- currentDocument_ = null;
- currentDocumentBuilder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.firestore.v1beta1.FirestoreProto
- .internal_static_google_firestore_v1beta1_DeleteDocumentRequest_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DeleteDocumentRequest getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.DeleteDocumentRequest.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DeleteDocumentRequest build() {
- com.google.firestore.v1beta1.DeleteDocumentRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DeleteDocumentRequest buildPartial() {
- com.google.firestore.v1beta1.DeleteDocumentRequest result =
- new com.google.firestore.v1beta1.DeleteDocumentRequest(this);
- result.name_ = name_;
- if (currentDocumentBuilder_ == null) {
- result.currentDocument_ = currentDocument_;
- } else {
- result.currentDocument_ = currentDocumentBuilder_.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 com.google.firestore.v1beta1.DeleteDocumentRequest) {
- return mergeFrom((com.google.firestore.v1beta1.DeleteDocumentRequest) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.DeleteDocumentRequest other) {
- if (other == com.google.firestore.v1beta1.DeleteDocumentRequest.getDefaultInstance())
- return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (other.hasCurrentDocument()) {
- mergeCurrentDocument(other.getCurrentDocument());
- }
- 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 {
- com.google.firestore.v1beta1.DeleteDocumentRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.firestore.v1beta1.DeleteDocumentRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @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;
- }
- }
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @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;
- }
- }
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @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;
- }
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return This builder for chaining.
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @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.firestore.v1beta1.Precondition currentDocument_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Precondition,
- com.google.firestore.v1beta1.Precondition.Builder,
- com.google.firestore.v1beta1.PreconditionOrBuilder>
- currentDocumentBuilder_;
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- *
- * @return Whether the currentDocument field is set.
- */
- public boolean hasCurrentDocument() {
- return currentDocumentBuilder_ != null || currentDocument_ != null;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- *
- * @return The currentDocument.
- */
- public com.google.firestore.v1beta1.Precondition getCurrentDocument() {
- if (currentDocumentBuilder_ == null) {
- return currentDocument_ == null
- ? com.google.firestore.v1beta1.Precondition.getDefaultInstance()
- : currentDocument_;
- } else {
- return currentDocumentBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- public Builder setCurrentDocument(com.google.firestore.v1beta1.Precondition value) {
- if (currentDocumentBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- currentDocument_ = value;
- onChanged();
- } else {
- currentDocumentBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- public Builder setCurrentDocument(
- com.google.firestore.v1beta1.Precondition.Builder builderForValue) {
- if (currentDocumentBuilder_ == null) {
- currentDocument_ = builderForValue.build();
- onChanged();
- } else {
- currentDocumentBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- public Builder mergeCurrentDocument(com.google.firestore.v1beta1.Precondition value) {
- if (currentDocumentBuilder_ == null) {
- if (currentDocument_ != null) {
- currentDocument_ =
- com.google.firestore.v1beta1.Precondition.newBuilder(currentDocument_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- currentDocument_ = value;
- }
- onChanged();
- } else {
- currentDocumentBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- public Builder clearCurrentDocument() {
- if (currentDocumentBuilder_ == null) {
- currentDocument_ = null;
- onChanged();
- } else {
- currentDocument_ = null;
- currentDocumentBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- public com.google.firestore.v1beta1.Precondition.Builder getCurrentDocumentBuilder() {
-
- onChanged();
- return getCurrentDocumentFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- public com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder() {
- if (currentDocumentBuilder_ != null) {
- return currentDocumentBuilder_.getMessageOrBuilder();
- } else {
- return currentDocument_ == null
- ? com.google.firestore.v1beta1.Precondition.getDefaultInstance()
- : currentDocument_;
- }
- }
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Precondition,
- com.google.firestore.v1beta1.Precondition.Builder,
- com.google.firestore.v1beta1.PreconditionOrBuilder>
- getCurrentDocumentFieldBuilder() {
- if (currentDocumentBuilder_ == null) {
- currentDocumentBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Precondition,
- com.google.firestore.v1beta1.Precondition.Builder,
- com.google.firestore.v1beta1.PreconditionOrBuilder>(
- getCurrentDocument(), getParentForChildren(), isClean());
- currentDocument_ = null;
- }
- return currentDocumentBuilder_;
- }
-
- @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.firestore.v1beta1.DeleteDocumentRequest)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DeleteDocumentRequest)
- private static final com.google.firestore.v1beta1.DeleteDocumentRequest DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.DeleteDocumentRequest();
- }
-
- public static com.google.firestore.v1beta1.DeleteDocumentRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public DeleteDocumentRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new DeleteDocumentRequest(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 com.google.firestore.v1beta1.DeleteDocumentRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequestOrBuilder.java
deleted file mode 100644
index 4229938dd..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequestOrBuilder.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/firestore.proto
-
-package com.google.firestore.v1beta1;
-
-public interface DeleteDocumentRequestOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.DeleteDocumentRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The name.
- */
- java.lang.String getName();
- /**
- *
- *
- *
- * Required. The resource name of the Document to delete. In the format:
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
- *
- *
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
- *
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString getNameBytes();
-
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- *
- * @return Whether the currentDocument field is set.
- */
- boolean hasCurrentDocument();
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- *
- * @return The currentDocument.
- */
- com.google.firestore.v1beta1.Precondition getCurrentDocument();
- /**
- *
- *
- *
- * An optional precondition on the document.
- * The request will fail if this is set and not met by the target document.
- *
- *
- * .google.firestore.v1beta1.Precondition current_document = 2;
- */
- com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder();
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java
deleted file mode 100644
index f922e3e8d..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java
+++ /dev/null
@@ -1,1793 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/document.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * A Firestore document.
- * Must not exceed 1 MiB - 4 bytes.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.Document}
- */
-public final class Document extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentProto
- .internal_static_google_firestore_v1beta1_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 com.google.firestore.v1beta1.DocumentProto
- .internal_static_google_firestore_v1beta1_Document_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.Document.class,
- com.google.firestore.v1beta1.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
- defaultEntry =
- com.google.protobuf.MapEntry
- .newDefaultInstance(
- com.google.firestore.v1beta1.DocumentProto
- .internal_static_google_firestore_v1beta1_Document_FieldsEntry_descriptor,
- com.google.protobuf.WireFormat.FieldType.STRING,
- "",
- com.google.protobuf.WireFormat.FieldType.MESSAGE,
- com.google.firestore.v1beta1.Value.getDefaultInstance());
- }
-
- private com.google.protobuf.MapField
- 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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.Value getFieldsOrDefault(
- java.lang.String key, com.google.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.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_;
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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_;
- }
- /**
- *
- *
- *
- * Output only. 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_;
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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_;
- }
- /**
- *
- *
- *
- * Output only. 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 com.google.firestore.v1beta1.Document)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.Document other = (com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.Document parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.Document parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.Document parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.Document parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.Document parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.Document parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.Document parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.Document parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.Document parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.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(com.google.firestore.v1beta1.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.
- * Must not exceed 1 MiB - 4 bytes.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.Document}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.Document)
- com.google.firestore.v1beta1.DocumentOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.DocumentProto
- .internal_static_google_firestore_v1beta1_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 com.google.firestore.v1beta1.DocumentProto
- .internal_static_google_firestore_v1beta1_Document_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.Document.class,
- com.google.firestore.v1beta1.Document.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentProto
- .internal_static_google_firestore_v1beta1_Document_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.Document getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.Document.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.Document build() {
- com.google.firestore.v1beta1.Document result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.Document buildPartial() {
- com.google.firestore.v1beta1.Document result =
- new com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.Document) {
- return mergeFrom((com.google.firestore.v1beta1.Document) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.Document other) {
- if (other == com.google.firestore.v1beta1.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 {
- com.google.firestore.v1beta1.Document parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.firestore.v1beta1.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
- 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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.Value getFieldsOrDefault(
- java.lang.String key, com.google.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- public Builder putFields(java.lang.String key, com.google.firestore.v1beta1.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.firestore.v1beta1.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_;
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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();
- }
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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();
- }
- /**
- *
- *
- *
- * Output only. 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_;
- }
- }
- /**
- *
- *
- *
- * Output only. 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_;
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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();
- }
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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;
- }
- /**
- *
- *
- *
- * Output only. 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();
- }
- /**
- *
- *
- *
- * Output only. 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_;
- }
- }
- /**
- *
- *
- *
- * Output only. 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.firestore.v1beta1.Document)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Document)
- private static final com.google.firestore.v1beta1.Document DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.Document();
- }
-
- public static com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.Document getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java
deleted file mode 100644
index 072ec2a11..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java
+++ /dev/null
@@ -1,1246 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/write.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * A [Document][google.firestore.v1beta1.Document] has changed.
- * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
- * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
- * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
- * change, if multiple targets are affected.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DocumentChange}
- */
-public final class DocumentChange extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.DocumentChange)
- DocumentChangeOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DocumentChange.newBuilder() to construct.
- private DocumentChange(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private DocumentChange() {
- targetIds_ = emptyIntList();
- removedTargetIds_ = emptyIntList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new DocumentChange();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return this.unknownFields;
- }
-
- private DocumentChange(
- 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.firestore.v1beta1.Document.Builder subBuilder = null;
- if (document_ != null) {
- subBuilder = document_.toBuilder();
- }
- document_ =
- input.readMessage(
- com.google.firestore.v1beta1.Document.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(document_);
- document_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 40:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- targetIds_ = newIntList();
- mutable_bitField0_ |= 0x00000001;
- }
- targetIds_.addInt(input.readInt32());
- break;
- }
- case 42:
- {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
- targetIds_ = newIntList();
- mutable_bitField0_ |= 0x00000001;
- }
- while (input.getBytesUntilLimit() > 0) {
- targetIds_.addInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 48:
- {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- removedTargetIds_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- removedTargetIds_.addInt(input.readInt32());
- break;
- }
- case 50:
- {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
- removedTargetIds_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- removedTargetIds_.addInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- targetIds_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- removedTargetIds_.makeImmutable(); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentChange_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentChange_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DocumentChange.class,
- com.google.firestore.v1beta1.DocumentChange.Builder.class);
- }
-
- public static final int DOCUMENT_FIELD_NUMBER = 1;
- private com.google.firestore.v1beta1.Document document_;
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- *
- * @return Whether the document field is set.
- */
- @java.lang.Override
- public boolean hasDocument() {
- return document_ != null;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- *
- * @return The document.
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.Document getDocument() {
- return document_ == null
- ? com.google.firestore.v1beta1.Document.getDefaultInstance()
- : document_;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() {
- return getDocument();
- }
-
- public static final int TARGET_IDS_FIELD_NUMBER = 5;
- private com.google.protobuf.Internal.IntList targetIds_;
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return A list containing the targetIds.
- */
- @java.lang.Override
- public java.util.List getTargetIdsList() {
- return targetIds_;
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return The count of targetIds.
- */
- public int getTargetIdsCount() {
- return targetIds_.size();
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @param index The index of the element to return.
- * @return The targetIds at the given index.
- */
- public int getTargetIds(int index) {
- return targetIds_.getInt(index);
- }
-
- private int targetIdsMemoizedSerializedSize = -1;
-
- public static final int REMOVED_TARGET_IDS_FIELD_NUMBER = 6;
- private com.google.protobuf.Internal.IntList removedTargetIds_;
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return A list containing the removedTargetIds.
- */
- @java.lang.Override
- public java.util.List getRemovedTargetIdsList() {
- return removedTargetIds_;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return The count of removedTargetIds.
- */
- public int getRemovedTargetIdsCount() {
- return removedTargetIds_.size();
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index of the element to return.
- * @return The removedTargetIds at the given index.
- */
- public int getRemovedTargetIds(int index) {
- return removedTargetIds_.getInt(index);
- }
-
- private int removedTargetIdsMemoizedSerializedSize = -1;
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- getSerializedSize();
- if (document_ != null) {
- output.writeMessage(1, getDocument());
- }
- if (getTargetIdsList().size() > 0) {
- output.writeUInt32NoTag(42);
- output.writeUInt32NoTag(targetIdsMemoizedSerializedSize);
- }
- for (int i = 0; i < targetIds_.size(); i++) {
- output.writeInt32NoTag(targetIds_.getInt(i));
- }
- if (getRemovedTargetIdsList().size() > 0) {
- output.writeUInt32NoTag(50);
- output.writeUInt32NoTag(removedTargetIdsMemoizedSerializedSize);
- }
- for (int i = 0; i < removedTargetIds_.size(); i++) {
- output.writeInt32NoTag(removedTargetIds_.getInt(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (document_ != null) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocument());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < targetIds_.size(); i++) {
- dataSize +=
- com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(targetIds_.getInt(i));
- }
- size += dataSize;
- if (!getTargetIdsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
- }
- targetIdsMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < removedTargetIds_.size(); i++) {
- dataSize +=
- com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(
- removedTargetIds_.getInt(i));
- }
- size += dataSize;
- if (!getRemovedTargetIdsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
- }
- removedTargetIdsMemoizedSerializedSize = dataSize;
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.firestore.v1beta1.DocumentChange)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.DocumentChange other =
- (com.google.firestore.v1beta1.DocumentChange) obj;
-
- if (hasDocument() != other.hasDocument()) return false;
- if (hasDocument()) {
- if (!getDocument().equals(other.getDocument())) return false;
- }
- if (!getTargetIdsList().equals(other.getTargetIdsList())) return false;
- if (!getRemovedTargetIdsList().equals(other.getRemovedTargetIdsList())) 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 (hasDocument()) {
- hash = (37 * hash) + DOCUMENT_FIELD_NUMBER;
- hash = (53 * hash) + getDocument().hashCode();
- }
- if (getTargetIdsCount() > 0) {
- hash = (37 * hash) + TARGET_IDS_FIELD_NUMBER;
- hash = (53 * hash) + getTargetIdsList().hashCode();
- }
- if (getRemovedTargetIdsCount() > 0) {
- hash = (37 * hash) + REMOVED_TARGET_IDS_FIELD_NUMBER;
- hash = (53 * hash) + getRemovedTargetIdsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange 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 com.google.firestore.v1beta1.DocumentChange parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange 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 com.google.firestore.v1beta1.DocumentChange parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DocumentChange 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(com.google.firestore.v1beta1.DocumentChange 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 [Document][google.firestore.v1beta1.Document] has changed.
- * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
- * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
- * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
- * change, if multiple targets are affected.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DocumentChange}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.DocumentChange)
- com.google.firestore.v1beta1.DocumentChangeOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentChange_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentChange_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DocumentChange.class,
- com.google.firestore.v1beta1.DocumentChange.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.DocumentChange.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 (documentBuilder_ == null) {
- document_ = null;
- } else {
- document_ = null;
- documentBuilder_ = null;
- }
- targetIds_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000001);
- removedTargetIds_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentChange_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentChange getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.DocumentChange.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentChange build() {
- com.google.firestore.v1beta1.DocumentChange result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentChange buildPartial() {
- com.google.firestore.v1beta1.DocumentChange result =
- new com.google.firestore.v1beta1.DocumentChange(this);
- int from_bitField0_ = bitField0_;
- if (documentBuilder_ == null) {
- result.document_ = document_;
- } else {
- result.document_ = documentBuilder_.build();
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- targetIds_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.targetIds_ = targetIds_;
- if (((bitField0_ & 0x00000002) != 0)) {
- removedTargetIds_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.removedTargetIds_ = removedTargetIds_;
- 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 com.google.firestore.v1beta1.DocumentChange) {
- return mergeFrom((com.google.firestore.v1beta1.DocumentChange) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.DocumentChange other) {
- if (other == com.google.firestore.v1beta1.DocumentChange.getDefaultInstance()) return this;
- if (other.hasDocument()) {
- mergeDocument(other.getDocument());
- }
- if (!other.targetIds_.isEmpty()) {
- if (targetIds_.isEmpty()) {
- targetIds_ = other.targetIds_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureTargetIdsIsMutable();
- targetIds_.addAll(other.targetIds_);
- }
- onChanged();
- }
- if (!other.removedTargetIds_.isEmpty()) {
- if (removedTargetIds_.isEmpty()) {
- removedTargetIds_ = other.removedTargetIds_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureRemovedTargetIdsIsMutable();
- removedTargetIds_.addAll(other.removedTargetIds_);
- }
- 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 {
- com.google.firestore.v1beta1.DocumentChange parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.firestore.v1beta1.DocumentChange) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int bitField0_;
-
- private com.google.firestore.v1beta1.Document document_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Document,
- com.google.firestore.v1beta1.Document.Builder,
- com.google.firestore.v1beta1.DocumentOrBuilder>
- documentBuilder_;
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- *
- * @return Whether the document field is set.
- */
- public boolean hasDocument() {
- return documentBuilder_ != null || document_ != null;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- *
- * @return The document.
- */
- public com.google.firestore.v1beta1.Document getDocument() {
- if (documentBuilder_ == null) {
- return document_ == null
- ? com.google.firestore.v1beta1.Document.getDefaultInstance()
- : document_;
- } else {
- return documentBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- public Builder setDocument(com.google.firestore.v1beta1.Document value) {
- if (documentBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- document_ = value;
- onChanged();
- } else {
- documentBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- public Builder setDocument(com.google.firestore.v1beta1.Document.Builder builderForValue) {
- if (documentBuilder_ == null) {
- document_ = builderForValue.build();
- onChanged();
- } else {
- documentBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- public Builder mergeDocument(com.google.firestore.v1beta1.Document value) {
- if (documentBuilder_ == null) {
- if (document_ != null) {
- document_ =
- com.google.firestore.v1beta1.Document.newBuilder(document_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- document_ = value;
- }
- onChanged();
- } else {
- documentBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- public Builder clearDocument() {
- if (documentBuilder_ == null) {
- document_ = null;
- onChanged();
- } else {
- document_ = null;
- documentBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- public com.google.firestore.v1beta1.Document.Builder getDocumentBuilder() {
-
- onChanged();
- return getDocumentFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() {
- if (documentBuilder_ != null) {
- return documentBuilder_.getMessageOrBuilder();
- } else {
- return document_ == null
- ? com.google.firestore.v1beta1.Document.getDefaultInstance()
- : document_;
- }
- }
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Document,
- com.google.firestore.v1beta1.Document.Builder,
- com.google.firestore.v1beta1.DocumentOrBuilder>
- getDocumentFieldBuilder() {
- if (documentBuilder_ == null) {
- documentBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.firestore.v1beta1.Document,
- com.google.firestore.v1beta1.Document.Builder,
- com.google.firestore.v1beta1.DocumentOrBuilder>(
- getDocument(), getParentForChildren(), isClean());
- document_ = null;
- }
- return documentBuilder_;
- }
-
- private com.google.protobuf.Internal.IntList targetIds_ = emptyIntList();
-
- private void ensureTargetIdsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- targetIds_ = mutableCopy(targetIds_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return A list containing the targetIds.
- */
- public java.util.List getTargetIdsList() {
- return ((bitField0_ & 0x00000001) != 0)
- ? java.util.Collections.unmodifiableList(targetIds_)
- : targetIds_;
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return The count of targetIds.
- */
- public int getTargetIdsCount() {
- return targetIds_.size();
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @param index The index of the element to return.
- * @return The targetIds at the given index.
- */
- public int getTargetIds(int index) {
- return targetIds_.getInt(index);
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @param index The index to set the value at.
- * @param value The targetIds to set.
- * @return This builder for chaining.
- */
- public Builder setTargetIds(int index, int value) {
- ensureTargetIdsIsMutable();
- targetIds_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @param value The targetIds to add.
- * @return This builder for chaining.
- */
- public Builder addTargetIds(int value) {
- ensureTargetIdsIsMutable();
- targetIds_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @param values The targetIds to add.
- * @return This builder for chaining.
- */
- public Builder addAllTargetIds(java.lang.Iterable extends java.lang.Integer> values) {
- ensureTargetIdsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetIds_);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearTargetIds() {
- targetIds_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList removedTargetIds_ = emptyIntList();
-
- private void ensureRemovedTargetIdsIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- removedTargetIds_ = mutableCopy(removedTargetIds_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return A list containing the removedTargetIds.
- */
- public java.util.List getRemovedTargetIdsList() {
- return ((bitField0_ & 0x00000002) != 0)
- ? java.util.Collections.unmodifiableList(removedTargetIds_)
- : removedTargetIds_;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return The count of removedTargetIds.
- */
- public int getRemovedTargetIdsCount() {
- return removedTargetIds_.size();
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index of the element to return.
- * @return The removedTargetIds at the given index.
- */
- public int getRemovedTargetIds(int index) {
- return removedTargetIds_.getInt(index);
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index to set the value at.
- * @param value The removedTargetIds to set.
- * @return This builder for chaining.
- */
- public Builder setRemovedTargetIds(int index, int value) {
- ensureRemovedTargetIdsIsMutable();
- removedTargetIds_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param value The removedTargetIds to add.
- * @return This builder for chaining.
- */
- public Builder addRemovedTargetIds(int value) {
- ensureRemovedTargetIdsIsMutable();
- removedTargetIds_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param values The removedTargetIds to add.
- * @return This builder for chaining.
- */
- public Builder addAllRemovedTargetIds(java.lang.Iterable extends java.lang.Integer> values) {
- ensureRemovedTargetIdsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, removedTargetIds_);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return This builder for chaining.
- */
- public Builder clearRemovedTargetIds() {
- removedTargetIds_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- 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.firestore.v1beta1.DocumentChange)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentChange)
- private static final com.google.firestore.v1beta1.DocumentChange DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.DocumentChange();
- }
-
- public static com.google.firestore.v1beta1.DocumentChange getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public DocumentChange parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new DocumentChange(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 com.google.firestore.v1beta1.DocumentChange getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChangeOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChangeOrBuilder.java
deleted file mode 100644
index 2351afec2..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChangeOrBuilder.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/write.proto
-
-package com.google.firestore.v1beta1;
-
-public interface DocumentChangeOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.DocumentChange)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- *
- * @return Whether the document field is set.
- */
- boolean hasDocument();
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- *
- * @return The document.
- */
- com.google.firestore.v1beta1.Document getDocument();
- /**
- *
- *
- *
- * The new state of the [Document][google.firestore.v1beta1.Document].
- * If `mask` is set, contains only fields that were updated or added.
- *
- *
- * .google.firestore.v1beta1.Document document = 1;
- */
- com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder();
-
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return A list containing the targetIds.
- */
- java.util.List getTargetIdsList();
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @return The count of targetIds.
- */
- int getTargetIdsCount();
- /**
- *
- *
- *
- * A set of target IDs of targets that match this document.
- *
- *
- * repeated int32 target_ids = 5;
- *
- * @param index The index of the element to return.
- * @return The targetIds at the given index.
- */
- int getTargetIds(int index);
-
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return A list containing the removedTargetIds.
- */
- java.util.List getRemovedTargetIdsList();
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return The count of removedTargetIds.
- */
- int getRemovedTargetIdsCount();
- /**
- *
- *
- *
- * A set of target IDs for targets that no longer match this document.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index of the element to return.
- * @return The removedTargetIds at the given index.
- */
- int getRemovedTargetIds(int index);
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java
deleted file mode 100644
index 443dd3600..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java
+++ /dev/null
@@ -1,1172 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/write.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * A [Document][google.firestore.v1beta1.Document] has been deleted.
- * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
- * last of which deleted the [Document][google.firestore.v1beta1.Document].
- * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
- * delete, if multiple targets are affected.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DocumentDelete}
- */
-public final class DocumentDelete extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.DocumentDelete)
- DocumentDeleteOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DocumentDelete.newBuilder() to construct.
- private DocumentDelete(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private DocumentDelete() {
- document_ = "";
- removedTargetIds_ = emptyIntList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new DocumentDelete();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return this.unknownFields;
- }
-
- private DocumentDelete(
- 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();
-
- document_ = s;
- break;
- }
- case 34:
- {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (readTime_ != null) {
- subBuilder = readTime_.toBuilder();
- }
- readTime_ =
- input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(readTime_);
- readTime_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 48:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- removedTargetIds_ = newIntList();
- mutable_bitField0_ |= 0x00000001;
- }
- removedTargetIds_.addInt(input.readInt32());
- break;
- }
- case 50:
- {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
- removedTargetIds_ = newIntList();
- mutable_bitField0_ |= 0x00000001;
- }
- while (input.getBytesUntilLimit() > 0) {
- removedTargetIds_.addInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- removedTargetIds_.makeImmutable(); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentDelete_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentDelete_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DocumentDelete.class,
- com.google.firestore.v1beta1.DocumentDelete.Builder.class);
- }
-
- public static final int DOCUMENT_FIELD_NUMBER = 1;
- private volatile java.lang.Object document_;
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return The document.
- */
- @java.lang.Override
- public java.lang.String getDocument() {
- java.lang.Object ref = document_;
- 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();
- document_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return The bytes for document.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getDocumentBytes() {
- java.lang.Object ref = document_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- document_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int REMOVED_TARGET_IDS_FIELD_NUMBER = 6;
- private com.google.protobuf.Internal.IntList removedTargetIds_;
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return A list containing the removedTargetIds.
- */
- @java.lang.Override
- public java.util.List getRemovedTargetIdsList() {
- return removedTargetIds_;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return The count of removedTargetIds.
- */
- public int getRemovedTargetIdsCount() {
- return removedTargetIds_.size();
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index of the element to return.
- * @return The removedTargetIds at the given index.
- */
- public int getRemovedTargetIds(int index) {
- return removedTargetIds_.getInt(index);
- }
-
- private int removedTargetIdsMemoizedSerializedSize = -1;
-
- public static final int READ_TIME_FIELD_NUMBER = 4;
- private com.google.protobuf.Timestamp readTime_;
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- *
- * @return Whether the readTime field is set.
- */
- @java.lang.Override
- public boolean hasReadTime() {
- return readTime_ != null;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- *
- * @return The readTime.
- */
- @java.lang.Override
- public com.google.protobuf.Timestamp getReadTime() {
- return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- @java.lang.Override
- public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
- return getReadTime();
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- getSerializedSize();
- if (!getDocumentBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, document_);
- }
- if (readTime_ != null) {
- output.writeMessage(4, getReadTime());
- }
- if (getRemovedTargetIdsList().size() > 0) {
- output.writeUInt32NoTag(50);
- output.writeUInt32NoTag(removedTargetIdsMemoizedSerializedSize);
- }
- for (int i = 0; i < removedTargetIds_.size(); i++) {
- output.writeInt32NoTag(removedTargetIds_.getInt(i));
- }
- unknownFields.writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getDocumentBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, document_);
- }
- if (readTime_ != null) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadTime());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < removedTargetIds_.size(); i++) {
- dataSize +=
- com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(
- removedTargetIds_.getInt(i));
- }
- size += dataSize;
- if (!getRemovedTargetIdsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
- }
- removedTargetIdsMemoizedSerializedSize = dataSize;
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.firestore.v1beta1.DocumentDelete)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.DocumentDelete other =
- (com.google.firestore.v1beta1.DocumentDelete) obj;
-
- if (!getDocument().equals(other.getDocument())) return false;
- if (!getRemovedTargetIdsList().equals(other.getRemovedTargetIdsList())) return false;
- if (hasReadTime() != other.hasReadTime()) return false;
- if (hasReadTime()) {
- if (!getReadTime().equals(other.getReadTime())) 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) + DOCUMENT_FIELD_NUMBER;
- hash = (53 * hash) + getDocument().hashCode();
- if (getRemovedTargetIdsCount() > 0) {
- hash = (37 * hash) + REMOVED_TARGET_IDS_FIELD_NUMBER;
- hash = (53 * hash) + getRemovedTargetIdsList().hashCode();
- }
- if (hasReadTime()) {
- hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
- hash = (53 * hash) + getReadTime().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete 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 com.google.firestore.v1beta1.DocumentDelete parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete 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 com.google.firestore.v1beta1.DocumentDelete parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete 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(com.google.firestore.v1beta1.DocumentDelete 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 [Document][google.firestore.v1beta1.Document] has been deleted.
- * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
- * last of which deleted the [Document][google.firestore.v1beta1.Document].
- * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
- * delete, if multiple targets are affected.
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DocumentDelete}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.DocumentDelete)
- com.google.firestore.v1beta1.DocumentDeleteOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentDelete_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentDelete_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DocumentDelete.class,
- com.google.firestore.v1beta1.DocumentDelete.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.DocumentDelete.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();
- document_ = "";
-
- removedTargetIds_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000001);
- if (readTimeBuilder_ == null) {
- readTime_ = null;
- } else {
- readTime_ = null;
- readTimeBuilder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.firestore.v1beta1.WriteProto
- .internal_static_google_firestore_v1beta1_DocumentDelete_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentDelete getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.DocumentDelete.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentDelete build() {
- com.google.firestore.v1beta1.DocumentDelete result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentDelete buildPartial() {
- com.google.firestore.v1beta1.DocumentDelete result =
- new com.google.firestore.v1beta1.DocumentDelete(this);
- int from_bitField0_ = bitField0_;
- result.document_ = document_;
- if (((bitField0_ & 0x00000001) != 0)) {
- removedTargetIds_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.removedTargetIds_ = removedTargetIds_;
- if (readTimeBuilder_ == null) {
- result.readTime_ = readTime_;
- } else {
- result.readTime_ = readTimeBuilder_.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 com.google.firestore.v1beta1.DocumentDelete) {
- return mergeFrom((com.google.firestore.v1beta1.DocumentDelete) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.DocumentDelete other) {
- if (other == com.google.firestore.v1beta1.DocumentDelete.getDefaultInstance()) return this;
- if (!other.getDocument().isEmpty()) {
- document_ = other.document_;
- onChanged();
- }
- if (!other.removedTargetIds_.isEmpty()) {
- if (removedTargetIds_.isEmpty()) {
- removedTargetIds_ = other.removedTargetIds_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureRemovedTargetIdsIsMutable();
- removedTargetIds_.addAll(other.removedTargetIds_);
- }
- onChanged();
- }
- if (other.hasReadTime()) {
- mergeReadTime(other.getReadTime());
- }
- 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 {
- com.google.firestore.v1beta1.DocumentDelete parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.firestore.v1beta1.DocumentDelete) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object document_ = "";
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return The document.
- */
- public java.lang.String getDocument() {
- java.lang.Object ref = document_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- document_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return The bytes for document.
- */
- public com.google.protobuf.ByteString getDocumentBytes() {
- java.lang.Object ref = document_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- document_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @param value The document to set.
- * @return This builder for chaining.
- */
- public Builder setDocument(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- document_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearDocument() {
-
- document_ = getDefaultInstance().getDocument();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @param value The bytes for document to set.
- * @return This builder for chaining.
- */
- public Builder setDocumentBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- document_ = value;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList removedTargetIds_ = emptyIntList();
-
- private void ensureRemovedTargetIdsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- removedTargetIds_ = mutableCopy(removedTargetIds_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return A list containing the removedTargetIds.
- */
- public java.util.List getRemovedTargetIdsList() {
- return ((bitField0_ & 0x00000001) != 0)
- ? java.util.Collections.unmodifiableList(removedTargetIds_)
- : removedTargetIds_;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return The count of removedTargetIds.
- */
- public int getRemovedTargetIdsCount() {
- return removedTargetIds_.size();
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index of the element to return.
- * @return The removedTargetIds at the given index.
- */
- public int getRemovedTargetIds(int index) {
- return removedTargetIds_.getInt(index);
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index to set the value at.
- * @param value The removedTargetIds to set.
- * @return This builder for chaining.
- */
- public Builder setRemovedTargetIds(int index, int value) {
- ensureRemovedTargetIdsIsMutable();
- removedTargetIds_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param value The removedTargetIds to add.
- * @return This builder for chaining.
- */
- public Builder addRemovedTargetIds(int value) {
- ensureRemovedTargetIdsIsMutable();
- removedTargetIds_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param values The removedTargetIds to add.
- * @return This builder for chaining.
- */
- public Builder addAllRemovedTargetIds(java.lang.Iterable extends java.lang.Integer> values) {
- ensureRemovedTargetIdsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, removedTargetIds_);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return This builder for chaining.
- */
- public Builder clearRemovedTargetIds() {
- removedTargetIds_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Timestamp readTime_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp,
- com.google.protobuf.Timestamp.Builder,
- com.google.protobuf.TimestampOrBuilder>
- readTimeBuilder_;
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- *
- * @return Whether the readTime field is set.
- */
- public boolean hasReadTime() {
- return readTimeBuilder_ != null || readTime_ != null;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- *
- * @return The readTime.
- */
- public com.google.protobuf.Timestamp getReadTime() {
- if (readTimeBuilder_ == null) {
- return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
- } else {
- return readTimeBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- public Builder setReadTime(com.google.protobuf.Timestamp value) {
- if (readTimeBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- readTime_ = value;
- onChanged();
- } else {
- readTimeBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
- if (readTimeBuilder_ == null) {
- readTime_ = builderForValue.build();
- onChanged();
- } else {
- readTimeBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
- if (readTimeBuilder_ == null) {
- if (readTime_ != null) {
- readTime_ =
- com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
- } else {
- readTime_ = value;
- }
- onChanged();
- } else {
- readTimeBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- public Builder clearReadTime() {
- if (readTimeBuilder_ == null) {
- readTime_ = null;
- onChanged();
- } else {
- readTime_ = null;
- readTimeBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
-
- onChanged();
- return getReadTimeFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
- if (readTimeBuilder_ != null) {
- return readTimeBuilder_.getMessageOrBuilder();
- } else {
- return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
- }
- }
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp,
- com.google.protobuf.Timestamp.Builder,
- com.google.protobuf.TimestampOrBuilder>
- getReadTimeFieldBuilder() {
- if (readTimeBuilder_ == null) {
- readTimeBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp,
- com.google.protobuf.Timestamp.Builder,
- com.google.protobuf.TimestampOrBuilder>(
- getReadTime(), getParentForChildren(), isClean());
- readTime_ = null;
- }
- return readTimeBuilder_;
- }
-
- @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.firestore.v1beta1.DocumentDelete)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentDelete)
- private static final com.google.firestore.v1beta1.DocumentDelete DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.DocumentDelete();
- }
-
- public static com.google.firestore.v1beta1.DocumentDelete getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public DocumentDelete parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new DocumentDelete(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 com.google.firestore.v1beta1.DocumentDelete getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java
deleted file mode 100644
index 351be7cc4..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/write.proto
-
-package com.google.firestore.v1beta1;
-
-public interface DocumentDeleteOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.DocumentDelete)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return The document.
- */
- java.lang.String getDocument();
- /**
- *
- *
- *
- * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
- *
- *
- * string document = 1;
- *
- * @return The bytes for document.
- */
- com.google.protobuf.ByteString getDocumentBytes();
-
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return A list containing the removedTargetIds.
- */
- java.util.List getRemovedTargetIdsList();
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @return The count of removedTargetIds.
- */
- int getRemovedTargetIdsCount();
- /**
- *
- *
- *
- * A set of target IDs for targets that previously matched this entity.
- *
- *
- * repeated int32 removed_target_ids = 6;
- *
- * @param index The index of the element to return.
- * @return The removedTargetIds at the given index.
- */
- int getRemovedTargetIds(int index);
-
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- *
- * @return Whether the readTime field is set.
- */
- boolean hasReadTime();
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- *
- * @return The readTime.
- */
- com.google.protobuf.Timestamp getReadTime();
- /**
- *
- *
- *
- * The read timestamp at which the delete was observed.
- * Greater or equal to the `commit_time` of the delete.
- *
- *
- * .google.protobuf.Timestamp read_time = 4;
- */
- com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java
deleted file mode 100644
index 5da2de915..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java
+++ /dev/null
@@ -1,756 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/common.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *
- * A set of field paths on a document.
- * Used to restrict a get or update operation on a document to a subset of its
- * fields.
- * This is different from standard field masks, as this is always scoped to a
- * [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DocumentMask}
- */
-public final class DocumentMask extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.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 com.google.firestore.v1beta1.CommonProto
- .internal_static_google_firestore_v1beta1_DocumentMask_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.CommonProto
- .internal_static_google_firestore_v1beta1_DocumentMask_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DocumentMask.class,
- com.google.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentMask)) {
- return super.equals(obj);
- }
- com.google.firestore.v1beta1.DocumentMask other =
- (com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentMask parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentMask parseFrom(
- java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentMask parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentMask parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentMask parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.firestore.v1beta1.DocumentMask parseFrom(
- byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.google.firestore.v1beta1.DocumentMask parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentMask parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentMask parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.firestore.v1beta1.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(com.google.firestore.v1beta1.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.
- * Used to restrict a get or update operation on a document to a subset of its
- * fields.
- * This is different from standard field masks, as this is always scoped to a
- * [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
- *
- *
- * Protobuf type {@code google.firestore.v1beta1.DocumentMask}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.DocumentMask)
- com.google.firestore.v1beta1.DocumentMaskOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.v1beta1.CommonProto
- .internal_static_google_firestore_v1beta1_DocumentMask_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.v1beta1.CommonProto
- .internal_static_google_firestore_v1beta1_DocumentMask_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.v1beta1.DocumentMask.class,
- com.google.firestore.v1beta1.DocumentMask.Builder.class);
- }
-
- // Construct using com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.CommonProto
- .internal_static_google_firestore_v1beta1_DocumentMask_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentMask getDefaultInstanceForType() {
- return com.google.firestore.v1beta1.DocumentMask.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentMask build() {
- com.google.firestore.v1beta1.DocumentMask result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.v1beta1.DocumentMask buildPartial() {
- com.google.firestore.v1beta1.DocumentMask result =
- new com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentMask) {
- return mergeFrom((com.google.firestore.v1beta1.DocumentMask) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.v1beta1.DocumentMask other) {
- if (other == com.google.firestore.v1beta1.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 {
- com.google.firestore.v1beta1.DocumentMask parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.DocumentMask)
- }
-
- // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentMask)
- private static final com.google.firestore.v1beta1.DocumentMask DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.firestore.v1beta1.DocumentMask();
- }
-
- public static com.google.firestore.v1beta1.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 com.google.firestore.v1beta1.DocumentMask getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java
deleted file mode 100644
index b0abce16c..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/common.proto
-
-package com.google.firestore.v1beta1;
-
-public interface DocumentMaskOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.DocumentMask)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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);
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentOrBuilder.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentOrBuilder.java
deleted file mode 100644
index 91d596cb1..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentOrBuilder.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/document.proto
-
-package com.google.firestore.v1beta1;
-
-public interface DocumentOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- com.google.firestore.v1beta1.Value getFieldsOrDefault(
- java.lang.String key, com.google.firestore.v1beta1.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.firestore.v1beta1.Value> fields = 2;
- */
- com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key);
-
- /**
- *
- *
- *
- * Output only. 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();
- /**
- *
- *
- *
- * Output only. 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();
- /**
- *
- *
- *
- * Output only. 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();
-
- /**
- *
- *
- *
- * Output only. 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();
- /**
- *
- *
- *
- * Output only. 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();
- /**
- *
- *
- *
- * Output only. 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();
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentPathName.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentPathName.java
deleted file mode 100644
index d4f4881ac..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentPathName.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firestore.v1beta1;
-
-import com.google.api.pathtemplate.PathTemplate;
-import com.google.api.resourcenames.ResourceName;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public class DocumentPathName implements ResourceName {
-
- private static final PathTemplate PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding(
- "projects/{project}/databases/{database}/documents/{document_path=**}");
-
- private volatile Map fieldValuesMap;
-
- private final String project;
- private final String database;
- private final String documentPath;
-
- public String getProject() {
- return project;
- }
-
- public String getDatabase() {
- return database;
- }
-
- public String getDocumentPath() {
- return documentPath;
- }
-
- public static Builder newBuilder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder(this);
- }
-
- private DocumentPathName(Builder builder) {
- project = Preconditions.checkNotNull(builder.getProject());
- database = Preconditions.checkNotNull(builder.getDatabase());
- documentPath = Preconditions.checkNotNull(builder.getDocumentPath());
- }
-
- public static DocumentPathName of(String project, String database, String documentPath) {
- return newBuilder()
- .setProject(project)
- .setDatabase(database)
- .setDocumentPath(documentPath)
- .build();
- }
-
- public static String format(String project, String database, String documentPath) {
- return newBuilder()
- .setProject(project)
- .setDatabase(database)
- .setDocumentPath(documentPath)
- .build()
- .toString();
- }
-
- public static DocumentPathName parse(String formattedString) {
- if (formattedString.isEmpty()) {
- return null;
- }
- Map matchMap =
- PATH_TEMPLATE.validatedMatch(
- formattedString, "DocumentPathName.parse: formattedString not in valid format");
- return of(matchMap.get("project"), matchMap.get("database"), matchMap.get("document_path"));
- }
-
- public static List parseList(List formattedStrings) {
- List list = new ArrayList<>(formattedStrings.size());
- for (String formattedString : formattedStrings) {
- list.add(parse(formattedString));
- }
- return list;
- }
-
- public static List toStringList(List values) {
- List list = new ArrayList(values.size());
- for (DocumentPathName value : values) {
- if (value == null) {
- list.add("");
- } else {
- list.add(value.toString());
- }
- }
- return list;
- }
-
- public static boolean isParsableFrom(String formattedString) {
- return PATH_TEMPLATE.matches(formattedString);
- }
-
- public Map getFieldValuesMap() {
- if (fieldValuesMap == null) {
- synchronized (this) {
- if (fieldValuesMap == null) {
- ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
- fieldMapBuilder.put("project", project);
- fieldMapBuilder.put("database", database);
- fieldMapBuilder.put("documentPath", documentPath);
- fieldValuesMap = fieldMapBuilder.build();
- }
- }
- }
- return fieldValuesMap;
- }
-
- public String getFieldValue(String fieldName) {
- return getFieldValuesMap().get(fieldName);
- }
-
- @Override
- public String toString() {
- return PATH_TEMPLATE.instantiate(
- "project", project, "database", database, "document_path", documentPath);
- }
-
- /** Builder for DocumentPathName. */
- public static class Builder {
-
- private String project;
- private String database;
- private String documentPath;
-
- public String getProject() {
- return project;
- }
-
- public String getDatabase() {
- return database;
- }
-
- public String getDocumentPath() {
- return documentPath;
- }
-
- public Builder setProject(String project) {
- this.project = project;
- return this;
- }
-
- public Builder setDatabase(String database) {
- this.database = database;
- return this;
- }
-
- public Builder setDocumentPath(String documentPath) {
- this.documentPath = documentPath;
- return this;
- }
-
- private Builder() {}
-
- private Builder(DocumentPathName documentPathName) {
- project = documentPathName.project;
- database = documentPathName.database;
- documentPath = documentPathName.documentPath;
- }
-
- public DocumentPathName build() {
- return new DocumentPathName(this);
- }
- }
-
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (o instanceof DocumentPathName) {
- DocumentPathName that = (DocumentPathName) o;
- return (this.project.equals(that.project))
- && (this.database.equals(that.database))
- && (this.documentPath.equals(that.documentPath));
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- int h = 1;
- h *= 1000003;
- h ^= project.hashCode();
- h *= 1000003;
- h ^= database.hashCode();
- h *= 1000003;
- h ^= documentPath.hashCode();
- return h;
- }
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java
deleted file mode 100644
index fcf2ea862..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/document.proto
-
-package com.google.firestore.v1beta1;
-
-public final class DocumentProto {
- private DocumentProto() {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
- }
-
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_Document_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_Document_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_Document_FieldsEntry_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_Document_FieldsEntry_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_Value_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_Value_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_ArrayValue_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_ArrayValue_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_MapValue_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_MapValue_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_firestore_v1beta1_MapValue_FieldsEntry_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_firestore_v1beta1_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/firestore/v1beta1/document.prot"
- + "o\022\030google.firestore.v1beta1\032\034google/prot"
- + "obuf/struct.proto\032\037google/protobuf/times"
- + "tamp.proto\032\030google/type/latlng.proto\032\034go"
- + "ogle/api/annotations.proto\"\212\002\n\010Document\022"
- + "\014\n\004name\030\001 \001(\t\022>\n\006fields\030\002 \003(\0132..google.f"
- + "irestore.v1beta1.Document.FieldsEntry\022/\n"
- + "\013create_time\030\003 \001(\0132\032.google.protobuf.Tim"
- + "estamp\022/\n\013update_time\030\004 \001(\0132\032.google.pro"
- + "tobuf.Timestamp\032N\n\013FieldsEntry\022\013\n\003key\030\001 "
- + "\001(\t\022.\n\005value\030\002 \001(\0132\037.google.firestore.v1"
- + "beta1.Value:\0028\001\"\270\003\n\005Value\0220\n\nnull_value\030"
- + "\013 \001(\0162\032.google.protobuf.NullValueH\000\022\027\n\rb"
- + "oolean_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\017timesta"
- + "mp_value\030\n \001(\0132\032.google.protobuf.Timesta"
- + "mpH\000\022\026\n\014string_value\030\021 \001(\tH\000\022\025\n\013bytes_va"
- + "lue\030\022 \001(\014H\000\022\031\n\017reference_value\030\005 \001(\tH\000\022."
- + "\n\017geo_point_value\030\010 \001(\0132\023.google.type.La"
- + "tLngH\000\022;\n\013array_value\030\t \001(\0132$.google.fir"
- + "estore.v1beta1.ArrayValueH\000\0227\n\tmap_value"
- + "\030\006 \001(\0132\".google.firestore.v1beta1.MapVal"
- + "ueH\000B\014\n\nvalue_type\"=\n\nArrayValue\022/\n\006valu"
- + "es\030\001 \003(\0132\037.google.firestore.v1beta1.Valu"
- + "e\"\232\001\n\010MapValue\022>\n\006fields\030\001 \003(\0132..google."
- + "firestore.v1beta1.MapValue.FieldsEntry\032N"
- + "\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022.\n\005value\030\002 \001("
- + "\0132\037.google.firestore.v1beta1.Value:\0028\001B\337"
- + "\001\n\034com.google.firestore.v1beta1B\rDocumen"
- + "tProtoP\001ZAgoogle.golang.org/genproto/goo"
- + "gleapis/firestore/v1beta1;firestore\242\002\004GC"
- + "FS\252\002\036Google.Cloud.Firestore.V1Beta1\312\002\036Go"
- + "ogle\\Cloud\\Firestore\\V1beta1\352\002!Google::C"
- + "loud::Firestore::V1beta1b\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(),
- com.google.api.AnnotationsProto.getDescriptor(),
- });
- internal_static_google_firestore_v1beta1_Document_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_firestore_v1beta1_Document_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_Document_descriptor,
- new java.lang.String[] {
- "Name", "Fields", "CreateTime", "UpdateTime",
- });
- internal_static_google_firestore_v1beta1_Document_FieldsEntry_descriptor =
- internal_static_google_firestore_v1beta1_Document_descriptor.getNestedTypes().get(0);
- internal_static_google_firestore_v1beta1_Document_FieldsEntry_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_Document_FieldsEntry_descriptor,
- new java.lang.String[] {
- "Key", "Value",
- });
- internal_static_google_firestore_v1beta1_Value_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_firestore_v1beta1_Value_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_Value_descriptor,
- new java.lang.String[] {
- "NullValue",
- "BooleanValue",
- "IntegerValue",
- "DoubleValue",
- "TimestampValue",
- "StringValue",
- "BytesValue",
- "ReferenceValue",
- "GeoPointValue",
- "ArrayValue",
- "MapValue",
- "ValueType",
- });
- internal_static_google_firestore_v1beta1_ArrayValue_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_firestore_v1beta1_ArrayValue_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_ArrayValue_descriptor,
- new java.lang.String[] {
- "Values",
- });
- internal_static_google_firestore_v1beta1_MapValue_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_google_firestore_v1beta1_MapValue_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_MapValue_descriptor,
- new java.lang.String[] {
- "Fields",
- });
- internal_static_google_firestore_v1beta1_MapValue_FieldsEntry_descriptor =
- internal_static_google_firestore_v1beta1_MapValue_descriptor.getNestedTypes().get(0);
- internal_static_google_firestore_v1beta1_MapValue_FieldsEntry_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_firestore_v1beta1_MapValue_FieldsEntry_descriptor,
- new java.lang.String[] {
- "Key", "Value",
- });
- com.google.protobuf.StructProto.getDescriptor();
- com.google.protobuf.TimestampProto.getDescriptor();
- com.google.type.LatLngProto.getDescriptor();
- com.google.api.AnnotationsProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java
deleted file mode 100644
index ec498b973..000000000
--- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java
+++ /dev/null
@@ -1,1174 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/firestore/v1beta1/write.proto
-
-package com.google.firestore.v1beta1;
-
-/**
- *
- *
- *