From 7fc4b3b2973faa23292b4f92f49ef1445d19934d Mon Sep 17 00:00:00 2001
From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com>
Date: Wed, 30 Jan 2019 13:04:42 -0800
Subject: [PATCH] Generate Firestore API v1 (#4410)
---
.../grpc-google-cloud-firestore-v1/pom.xml | 31 +
.../google/firestore/v1/FirestoreGrpc.java | 1788 +++
google-api-grpc/pom.xml | 12 +
.../proto-google-cloud-firestore-v1/pom.xml | 31 +
.../com/google/firestore/v1/AnyPathName.java | 240 +
.../com/google/firestore/v1/ArrayValue.java | 916 ++
.../firestore/v1/ArrayValueOrBuilder.java | 61 +
.../v1/BatchGetDocumentsRequest.java | 1975 +++
.../v1/BatchGetDocumentsRequestOrBuilder.java | 211 +
.../v1/BatchGetDocumentsResponse.java | 1373 ++
.../BatchGetDocumentsResponseOrBuilder.java | 119 +
.../firestore/v1/BeginTransactionRequest.java | 883 ++
.../v1/BeginTransactionRequestOrBuilder.java | 67 +
.../v1/BeginTransactionResponse.java | 520 +
.../v1/BeginTransactionResponseOrBuilder.java | 21 +
.../google/firestore/v1/CommitRequest.java | 1194 ++
.../firestore/v1/CommitRequestOrBuilder.java | 100 +
.../google/firestore/v1/CommitResponse.java | 1234 ++
.../firestore/v1/CommitResponseOrBuilder.java | 103 +
.../com/google/firestore/v1/CommonProto.java | 124 +
.../firestore/v1/CreateDocumentRequest.java | 1487 ++
.../v1/CreateDocumentRequestOrBuilder.java | 147 +
.../java/com/google/firestore/v1/Cursor.java | 1046 ++
.../google/firestore/v1/CursorOrBuilder.java | 83 +
.../google/firestore/v1/DatabaseRootName.java | 180 +
.../firestore/v1/DeleteDocumentRequest.java | 883 ++
.../v1/DeleteDocumentRequestOrBuilder.java | 67 +
.../com/google/firestore/v1/Document.java | 1722 +++
.../google/firestore/v1/DocumentChange.java | 1156 ++
.../firestore/v1/DocumentChangeOrBuilder.java | 106 +
.../google/firestore/v1/DocumentDelete.java | 1096 ++
.../firestore/v1/DocumentDeleteOrBuilder.java | 96 +
.../com/google/firestore/v1/DocumentMask.java | 698 +
.../firestore/v1/DocumentMaskOrBuilder.java | 55 +
.../firestore/v1/DocumentOrBuilder.java | 258 +
.../google/firestore/v1/DocumentPathName.java | 213 +
.../google/firestore/v1/DocumentProto.java | 163 +
.../google/firestore/v1/DocumentRemove.java | 1098 ++
.../firestore/v1/DocumentRemoveOrBuilder.java | 96 +
.../google/firestore/v1/DocumentRootName.java | 180 +
.../firestore/v1/DocumentTransform.java | 4484 ++++++
.../v1/DocumentTransformOrBuilder.java | 99 +
.../google/firestore/v1/ExistenceFilter.java | 603 +
.../v1/ExistenceFilterOrBuilder.java | 34 +
.../google/firestore/v1/FirestoreProto.java | 597 +
.../firestore/v1/GetDocumentRequest.java | 1357 ++
.../v1/GetDocumentRequestOrBuilder.java | 118 +
.../v1/ListCollectionIdsRequest.java | 867 ++
.../v1/ListCollectionIdsRequestOrBuilder.java | 71 +
.../v1/ListCollectionIdsResponse.java | 846 ++
.../ListCollectionIdsResponseOrBuilder.java | 72 +
.../firestore/v1/ListDocumentsRequest.java | 2055 +++
.../v1/ListDocumentsRequestOrBuilder.java | 218 +
.../firestore/v1/ListDocumentsResponse.java | 1087 ++
.../v1/ListDocumentsResponseOrBuilder.java | 82 +
.../google/firestore/v1/ListenRequest.java | 1370 ++
.../firestore/v1/ListenRequestOrBuilder.java | 131 +
.../google/firestore/v1/ListenResponse.java | 2007 +++
.../firestore/v1/ListenResponseOrBuilder.java | 179 +
.../com/google/firestore/v1/MapValue.java | 800 ++
.../firestore/v1/MapValueOrBuilder.java | 85 +
.../com/google/firestore/v1/Precondition.java | 900 ++
.../firestore/v1/PreconditionOrBuilder.java | 58 +
.../com/google/firestore/v1/QueryProto.java | 225 +
.../google/firestore/v1/RollbackRequest.java | 686 +
.../v1/RollbackRequestOrBuilder.java | 44 +
.../google/firestore/v1/RunQueryRequest.java | 1790 +++
.../v1/RunQueryRequestOrBuilder.java | 162 +
.../google/firestore/v1/RunQueryResponse.java | 1206 ++
.../v1/RunQueryResponseOrBuilder.java | 116 +
.../google/firestore/v1/StructuredQuery.java | 11934 ++++++++++++++++
.../v1/StructuredQueryOrBuilder.java | 353 +
.../java/com/google/firestore/v1/Target.java | 3572 +++++
.../com/google/firestore/v1/TargetChange.java | 1730 +++
.../firestore/v1/TargetChangeOrBuilder.java | 173 +
.../google/firestore/v1/TargetOrBuilder.java | 149 +
.../firestore/v1/TransactionOptions.java | 2480 ++++
.../v1/TransactionOptionsOrBuilder.java | 74 +
.../firestore/v1/UpdateDocumentRequest.java | 1599 +++
.../v1/UpdateDocumentRequestOrBuilder.java | 161 +
.../java/com/google/firestore/v1/Value.java | 2654 ++++
.../google/firestore/v1/ValueOrBuilder.java | 265 +
.../java/com/google/firestore/v1/Write.java | 1949 +++
.../google/firestore/v1/WriteOrBuilder.java | 195 +
.../com/google/firestore/v1/WriteProto.java | 195 +
.../com/google/firestore/v1/WriteRequest.java | 1802 +++
.../firestore/v1/WriteRequestOrBuilder.java | 205 +
.../google/firestore/v1/WriteResponse.java | 1492 ++
.../firestore/v1/WriteResponseOrBuilder.java | 139 +
.../com/google/firestore/v1/WriteResult.java | 1244 ++
.../firestore/v1/WriteResultOrBuilder.java | 107 +
.../proto/google/firestore/v1/common.proto | 84 +
.../proto/google/firestore/v1/document.proto | 151 +
.../proto/google/firestore/v1/firestore.proto | 761 +
.../proto/google/firestore/v1/query.proto | 236 +
.../proto/google/firestore/v1/write.proto | 255 +
.../firestore/v1beta1/DocumentTransform.java | 1386 ++
.../google/firestore/v1beta1/WriteProto.java | 59 +-
.../google/firestore/v1beta1/common.proto | 3 +-
.../google/firestore/v1beta1/document.proto | 3 +-
.../google/firestore/v1beta1/firestore.proto | 3 +-
.../google/firestore/v1beta1/query.proto | 3 +-
.../google/firestore/v1beta1/write.proto | 43 +-
google-cloud-bom/pom.xml | 10 +
.../google-cloud-firestore/pom.xml | 9 +
.../cloud/firestore/v1/FirestoreClient.java | 1286 ++
.../cloud/firestore/v1/FirestoreSettings.java | 334 +
.../cloud/firestore/v1/package-info.java | 49 +
.../firestore/v1/stub/FirestoreStub.java | 128 +
.../v1/stub/FirestoreStubSettings.java | 707 +
.../v1/stub/GrpcFirestoreCallableFactory.java | 115 +
.../firestore/v1/stub/GrpcFirestoreStub.java | 446 +
.../firestore/v1beta1/FirestoreClient.java | 2 +-
.../firestore/v1beta1/FirestoreSettings.java | 2 +-
.../cloud/firestore/v1beta1/package-info.java | 2 +-
.../firestore/v1beta1/stub/FirestoreStub.java | 2 +-
.../v1beta1/stub/FirestoreStubSettings.java | 2 +-
.../stub/GrpcFirestoreCallableFactory.java | 2 +-
.../v1beta1/stub/GrpcFirestoreStub.java | 2 +-
.../firestore/v1/FirestoreClientTest.java | 561 +
.../cloud/firestore/v1/MockFirestore.java | 57 +
.../cloud/firestore/v1/MockFirestoreImpl.java | 303 +
.../v1beta1/FirestoreClientTest.java | 2 +-
.../firestore/v1beta1/MockFirestore.java | 2 +-
.../firestore/v1beta1/MockFirestoreImpl.java | 2 +-
.../google-cloud-firestore/synth.py | 47 +-
google-cloud-clients/pom.xml | 2 +-
127 files changed, 83656 insertions(+), 59 deletions(-)
create mode 100644 google-api-grpc/grpc-google-cloud-firestore-v1/pom.xml
create mode 100644 google-api-grpc/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/pom.xml
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/AnyPathName.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValueOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CursorOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DatabaseRootName.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChangeOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentPathName.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRootName.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransformOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValueOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PreconditionOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQueryOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptionsOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ValueOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponseOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/common.proto
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto
create mode 100644 google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/package-info.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreCallableFactory.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestore.java
create mode 100644 google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java
diff --git a/google-api-grpc/grpc-google-cloud-firestore-v1/pom.xml b/google-api-grpc/grpc-google-cloud-firestore-v1/pom.xml
new file mode 100644
index 000000000000..0c42bddddf11
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-firestore-v1/pom.xml
@@ -0,0 +1,31 @@
+
+ * The Cloud Firestore service. + * This service exposes several types of comparable timestamps: + * * `create_time` - The time at which a document was created. Changes only + * when a document is deleted, then re-created. Increases in a strict + * monotonic fashion. + * * `update_time` - The time at which a document was last updated. Changes + * every time a document is modified. Does not change when a write results + * in no modifications. Increases in a strict monotonic fashion. + * * `read_time` - The time at which a particular state was observed. Used + * to denote a consistent snapshot of the database or the time at which a + * Document was observed to not exist. + * * `commit_time` - The time at which the writes in a transaction were + * committed. Any read with an equal or greater `read_time` is guaranteed + * to see the effects of the transaction. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/firestore/v1/firestore.proto") +public final class FirestoreGrpc { + + private FirestoreGrpc() {} + + public static final String SERVICE_NAME = "google.firestore.v1.Firestore"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetDocumentMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.v1.GetDocumentRequest, com.google.firestore.v1.Document> + METHOD_GET_DOCUMENT = getGetDocumentMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.v1.GetDocumentRequest, com.google.firestore.v1.Document> + getGetDocumentMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.v1.GetDocumentRequest, com.google.firestore.v1.Document> + getGetDocumentMethod() { + return getGetDocumentMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.v1.GetDocumentRequest, com.google.firestore.v1.Document> + getGetDocumentMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.v1.GetDocumentRequest, com.google.firestore.v1.Document> + getGetDocumentMethod; + if ((getGetDocumentMethod = FirestoreGrpc.getGetDocumentMethod) == null) { + synchronized (FirestoreGrpc.class) { + if ((getGetDocumentMethod = FirestoreGrpc.getGetDocumentMethod) == null) { + FirestoreGrpc.getGetDocumentMethod = + getGetDocumentMethod = + io.grpc.MethodDescriptor + .
+ * The Cloud Firestore service. + * This service exposes several types of comparable timestamps: + * * `create_time` - The time at which a document was created. Changes only + * when a document is deleted, then re-created. Increases in a strict + * monotonic fashion. + * * `update_time` - The time at which a document was last updated. Changes + * every time a document is modified. Does not change when a write results + * in no modifications. Increases in a strict monotonic fashion. + * * `read_time` - The time at which a particular state was observed. Used + * to denote a consistent snapshot of the database or the time at which a + * Document was observed to not exist. + * * `commit_time` - The time at which the writes in a transaction were + * committed. Any read with an equal or greater `read_time` is guaranteed + * to see the effects of the transaction. + *+ */ + public abstract static class FirestoreImplBase implements io.grpc.BindableService { + + /** + * + * + *
+ * Gets a single document. + *+ */ + public void getDocument( + com.google.firestore.v1.GetDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Lists documents. + *+ */ + public void listDocuments( + com.google.firestore.v1.ListDocumentsRequest request, + io.grpc.stub.StreamObserver
+ * Creates a new document. + *+ */ + public void createDocument( + com.google.firestore.v1.CreateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Updates or inserts a document. + *+ */ + public void updateDocument( + com.google.firestore.v1.UpdateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Deletes a document. + *+ */ + public void deleteDocument( + com.google.firestore.v1.DeleteDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Gets multiple documents. + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + *+ */ + public void batchGetDocuments( + com.google.firestore.v1.BatchGetDocumentsRequest request, + io.grpc.stub.StreamObserver
+ * Starts a new transaction. + *+ */ + public void beginTransaction( + com.google.firestore.v1.BeginTransactionRequest request, + io.grpc.stub.StreamObserver
+ * Commits a transaction, while optionally updating documents. + *+ */ + public void commit( + com.google.firestore.v1.CommitRequest request, + io.grpc.stub.StreamObserver
+ * Rolls back a transaction. + *+ */ + public void rollback( + com.google.firestore.v1.RollbackRequest request, + io.grpc.stub.StreamObserver
+ * Runs a query. + *+ */ + public void runQuery( + com.google.firestore.v1.RunQueryRequest request, + io.grpc.stub.StreamObserver
+ * Streams batches of document updates and deletes, in order. + *+ */ + public io.grpc.stub.StreamObserver
+ * Listens to changes. + *+ */ + public io.grpc.stub.StreamObserver
+ * Lists all the collection IDs underneath a document. + *+ */ + public void listCollectionIds( + com.google.firestore.v1.ListCollectionIdsRequest request, + io.grpc.stub.StreamObserver
+ * The Cloud Firestore service. + * This service exposes several types of comparable timestamps: + * * `create_time` - The time at which a document was created. Changes only + * when a document is deleted, then re-created. Increases in a strict + * monotonic fashion. + * * `update_time` - The time at which a document was last updated. Changes + * every time a document is modified. Does not change when a write results + * in no modifications. Increases in a strict monotonic fashion. + * * `read_time` - The time at which a particular state was observed. Used + * to denote a consistent snapshot of the database or the time at which a + * Document was observed to not exist. + * * `commit_time` - The time at which the writes in a transaction were + * committed. Any read with an equal or greater `read_time` is guaranteed + * to see the effects of the transaction. + *+ */ + public static final class FirestoreStub extends io.grpc.stub.AbstractStub
+ * Gets a single document. + *+ */ + public void getDocument( + com.google.firestore.v1.GetDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Lists documents. + *+ */ + public void listDocuments( + com.google.firestore.v1.ListDocumentsRequest request, + io.grpc.stub.StreamObserver
+ * Creates a new document. + *+ */ + public void createDocument( + com.google.firestore.v1.CreateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Updates or inserts a document. + *+ */ + public void updateDocument( + com.google.firestore.v1.UpdateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Deletes a document. + *+ */ + public void deleteDocument( + com.google.firestore.v1.DeleteDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Gets multiple documents. + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + *+ */ + public void batchGetDocuments( + com.google.firestore.v1.BatchGetDocumentsRequest request, + io.grpc.stub.StreamObserver
+ * Starts a new transaction. + *+ */ + public void beginTransaction( + com.google.firestore.v1.BeginTransactionRequest request, + io.grpc.stub.StreamObserver
+ * Commits a transaction, while optionally updating documents. + *+ */ + public void commit( + com.google.firestore.v1.CommitRequest request, + io.grpc.stub.StreamObserver
+ * Rolls back a transaction. + *+ */ + public void rollback( + com.google.firestore.v1.RollbackRequest request, + io.grpc.stub.StreamObserver
+ * Runs a query. + *+ */ + public void runQuery( + com.google.firestore.v1.RunQueryRequest request, + io.grpc.stub.StreamObserver
+ * Streams batches of document updates and deletes, in order. + *+ */ + public io.grpc.stub.StreamObserver
+ * Listens to changes. + *+ */ + public io.grpc.stub.StreamObserver
+ * Lists all the collection IDs underneath a document. + *+ */ + public void listCollectionIds( + com.google.firestore.v1.ListCollectionIdsRequest request, + io.grpc.stub.StreamObserver
+ * The Cloud Firestore service. + * This service exposes several types of comparable timestamps: + * * `create_time` - The time at which a document was created. Changes only + * when a document is deleted, then re-created. Increases in a strict + * monotonic fashion. + * * `update_time` - The time at which a document was last updated. Changes + * every time a document is modified. Does not change when a write results + * in no modifications. Increases in a strict monotonic fashion. + * * `read_time` - The time at which a particular state was observed. Used + * to denote a consistent snapshot of the database or the time at which a + * Document was observed to not exist. + * * `commit_time` - The time at which the writes in a transaction were + * committed. Any read with an equal or greater `read_time` is guaranteed + * to see the effects of the transaction. + *+ */ + public static final class FirestoreBlockingStub + extends io.grpc.stub.AbstractStub
+ * Gets a single document. + *+ */ + public com.google.firestore.v1.Document getDocument( + com.google.firestore.v1.GetDocumentRequest request) { + return blockingUnaryCall( + getChannel(), getGetDocumentMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists documents. + *+ */ + public com.google.firestore.v1.ListDocumentsResponse listDocuments( + com.google.firestore.v1.ListDocumentsRequest request) { + return blockingUnaryCall( + getChannel(), getListDocumentsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates a new document. + *+ */ + public com.google.firestore.v1.Document createDocument( + com.google.firestore.v1.CreateDocumentRequest request) { + return blockingUnaryCall( + getChannel(), getCreateDocumentMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates or inserts a document. + *+ */ + public com.google.firestore.v1.Document updateDocument( + com.google.firestore.v1.UpdateDocumentRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateDocumentMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Deletes a document. + *+ */ + public com.google.protobuf.Empty deleteDocument( + com.google.firestore.v1.DeleteDocumentRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteDocumentMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets multiple documents. + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + *+ */ + public java.util.Iterator
+ * Starts a new transaction. + *+ */ + public com.google.firestore.v1.BeginTransactionResponse beginTransaction( + com.google.firestore.v1.BeginTransactionRequest request) { + return blockingUnaryCall( + getChannel(), getBeginTransactionMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Commits a transaction, while optionally updating documents. + *+ */ + public com.google.firestore.v1.CommitResponse commit( + com.google.firestore.v1.CommitRequest request) { + return blockingUnaryCall(getChannel(), getCommitMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Rolls back a transaction. + *+ */ + public com.google.protobuf.Empty rollback(com.google.firestore.v1.RollbackRequest request) { + return blockingUnaryCall(getChannel(), getRollbackMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Runs a query. + *+ */ + public java.util.Iterator
+ * Lists all the collection IDs underneath a document. + *+ */ + public com.google.firestore.v1.ListCollectionIdsResponse listCollectionIds( + com.google.firestore.v1.ListCollectionIdsRequest request) { + return blockingUnaryCall( + getChannel(), getListCollectionIdsMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * The Cloud Firestore service. + * This service exposes several types of comparable timestamps: + * * `create_time` - The time at which a document was created. Changes only + * when a document is deleted, then re-created. Increases in a strict + * monotonic fashion. + * * `update_time` - The time at which a document was last updated. Changes + * every time a document is modified. Does not change when a write results + * in no modifications. Increases in a strict monotonic fashion. + * * `read_time` - The time at which a particular state was observed. Used + * to denote a consistent snapshot of the database or the time at which a + * Document was observed to not exist. + * * `commit_time` - The time at which the writes in a transaction were + * committed. Any read with an equal or greater `read_time` is guaranteed + * to see the effects of the transaction. + *+ */ + public static final class FirestoreFutureStub + extends io.grpc.stub.AbstractStub
+ * Gets a single document. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists documents. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.v1.ListDocumentsResponse> + listDocuments(com.google.firestore.v1.ListDocumentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDocumentsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Creates a new document. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Updates or inserts a document. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Deletes a document. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Starts a new transaction. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.v1.BeginTransactionResponse> + beginTransaction(com.google.firestore.v1.BeginTransactionRequest request) { + return futureUnaryCall( + getChannel().newCall(getBeginTransactionMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Commits a transaction, while optionally updating documents. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.v1.CommitResponse> + commit(com.google.firestore.v1.CommitRequest request) { + return futureUnaryCall( + getChannel().newCall(getCommitMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Rolls back a transaction. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists all the collection IDs underneath a document. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.v1.ListCollectionIdsResponse> + listCollectionIds(com.google.firestore.v1.ListCollectionIdsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListCollectionIdsMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_DOCUMENT = 0; + private static final int METHODID_LIST_DOCUMENTS = 1; + private static final int METHODID_CREATE_DOCUMENT = 2; + private static final int METHODID_UPDATE_DOCUMENT = 3; + private static final int METHODID_DELETE_DOCUMENT = 4; + private static final int METHODID_BATCH_GET_DOCUMENTS = 5; + private static final int METHODID_BEGIN_TRANSACTION = 6; + private static final int METHODID_COMMIT = 7; + private static final int METHODID_ROLLBACK = 8; + private static final int METHODID_RUN_QUERY = 9; + private static final int METHODID_LIST_COLLECTION_IDS = 10; + private static final int METHODID_WRITE = 11; + private static final int METHODID_LISTEN = 12; + + private static final class MethodHandlers
+ * An array value. + *+ * + * Protobuf type {@code google.firestore.v1.ArrayValue} + */ +public final class ArrayValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.ArrayValue) + ArrayValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrayValue.newBuilder() to construct. + private ArrayValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ArrayValue() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ArrayValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + values_ = new java.util.ArrayList
+ * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public java.util.List+ * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public java.util.List extends com.google.firestore.v1.ValueOrBuilder> getValuesOrBuilderList() {
+ return values_;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value getValues(int index) {
+ return values_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) {
+ return values_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < values_.size(); i++) {
+ output.writeMessage(1, values_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < values_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.firestore.v1.ArrayValue)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.ArrayValue other = (com.google.firestore.v1.ArrayValue) obj;
+
+ boolean result = true;
+ result = result && getValuesList().equals(other.getValuesList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getValuesCount() > 0) {
+ hash = (37 * hash) + VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getValuesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.ArrayValue 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.v1.ArrayValue parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.ArrayValue 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.v1.ArrayValue parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.ArrayValue parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.firestore.v1.ArrayValue prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * An array value. + *+ * + * Protobuf type {@code google.firestore.v1.ArrayValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public java.util.List+ * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public int getValuesCount() {
+ if (valuesBuilder_ == null) {
+ return values_.size();
+ } else {
+ return valuesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value getValues(int index) {
+ if (valuesBuilder_ == null) {
+ return values_.get(index);
+ } else {
+ return valuesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder setValues(int index, com.google.firestore.v1.Value value) {
+ if (valuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureValuesIsMutable();
+ values_.set(index, value);
+ onChanged();
+ } else {
+ valuesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder setValues(int index, com.google.firestore.v1.Value.Builder builderForValue) {
+ if (valuesBuilder_ == null) {
+ ensureValuesIsMutable();
+ values_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ valuesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder addValues(com.google.firestore.v1.Value value) {
+ if (valuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureValuesIsMutable();
+ values_.add(value);
+ onChanged();
+ } else {
+ valuesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder addValues(int index, com.google.firestore.v1.Value value) {
+ if (valuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureValuesIsMutable();
+ values_.add(index, value);
+ onChanged();
+ } else {
+ valuesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder addValues(com.google.firestore.v1.Value.Builder builderForValue) {
+ if (valuesBuilder_ == null) {
+ ensureValuesIsMutable();
+ values_.add(builderForValue.build());
+ onChanged();
+ } else {
+ valuesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder addValues(int index, com.google.firestore.v1.Value.Builder builderForValue) {
+ if (valuesBuilder_ == null) {
+ ensureValuesIsMutable();
+ values_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ valuesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends com.google.firestore.v1.Value> values) {
+ if (valuesBuilder_ == null) {
+ ensureValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_);
+ onChanged();
+ } else {
+ valuesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder clearValues() {
+ if (valuesBuilder_ == null) {
+ values_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ valuesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public Builder removeValues(int index) {
+ if (valuesBuilder_ == null) {
+ ensureValuesIsMutable();
+ values_.remove(index);
+ onChanged();
+ } else {
+ valuesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value.Builder getValuesBuilder(int index) {
+ return getValuesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) {
+ if (valuesBuilder_ == null) {
+ return values_.get(index);
+ } else {
+ return valuesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public java.util.List extends com.google.firestore.v1.ValueOrBuilder>
+ getValuesOrBuilderList() {
+ if (valuesBuilder_ != null) {
+ return valuesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(values_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value.Builder addValuesBuilder() {
+ return getValuesFieldBuilder().addBuilder(com.google.firestore.v1.Value.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value.Builder addValuesBuilder(int index) {
+ return getValuesFieldBuilder()
+ .addBuilder(index, com.google.firestore.v1.Value.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ public java.util.List+ * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ java.util.List+ * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ com.google.firestore.v1.Value getValues(int index);
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ int getValuesCount();
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ java.util.List extends com.google.firestore.v1.ValueOrBuilder> getValuesOrBuilderList();
+ /**
+ *
+ *
+ * + * Values in the array. + *+ * + *
repeated .google.firestore.v1.Value values = 1;
+ */
+ com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java
new file mode 100644
index 000000000000..80ede040eaa6
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java
@@ -0,0 +1,1975 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/firestore.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. + *+ * + * Protobuf type {@code google.firestore.v1.BatchGetDocumentsRequest} + */ +public final class BatchGetDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchGetDocumentsRequest) + BatchGetDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchGetDocumentsRequest.newBuilder() to construct. + private BatchGetDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchGetDocumentsRequest() { + database_ = ""; + documents_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchGetDocumentsRequest( + 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(); + + database_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + documents_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + documents_.add(s); + break; + } + case 26: + { + com.google.firestore.v1.DocumentMask.Builder subBuilder = null; + if (mask_ != null) { + subBuilder = mask_.toBuilder(); + } + mask_ = + input.readMessage( + com.google.firestore.v1.DocumentMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mask_); + mask_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + consistencySelectorCase_ = 4; + consistencySelector_ = input.readBytes(); + break; + } + case 42: + { + com.google.firestore.v1.TransactionOptions.Builder subBuilder = null; + if (consistencySelectorCase_ == 5) { + subBuilder = + ((com.google.firestore.v1.TransactionOptions) consistencySelector_).toBuilder(); + } + consistencySelector_ = + input.readMessage( + com.google.firestore.v1.TransactionOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.firestore.v1.TransactionOptions) consistencySelector_); + consistencySelector_ = subBuilder.buildPartial(); + } + consistencySelectorCase_ = 5; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (consistencySelectorCase_ == 7) { + subBuilder = ((com.google.protobuf.Timestamp) consistencySelector_).toBuilder(); + } + consistencySelector_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) consistencySelector_); + consistencySelector_ = subBuilder.buildPartial(); + } + consistencySelectorCase_ = 7; + break; + } + default: + { + if (!parseUnknownFieldProto3(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_ & 0x00000002) == 0x00000002)) { + documents_ = documents_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchGetDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchGetDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BatchGetDocumentsRequest.class, + com.google.firestore.v1.BatchGetDocumentsRequest.Builder.class); + } + + private int bitField0_; + private int consistencySelectorCase_ = 0; + private java.lang.Object consistencySelector_; + + public enum ConsistencySelectorCase implements com.google.protobuf.Internal.EnumLite { + TRANSACTION(4), + NEW_TRANSACTION(5), + READ_TIME(7), + CONSISTENCYSELECTOR_NOT_SET(0); + private final int value; + + private ConsistencySelectorCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ConsistencySelectorCase valueOf(int value) { + return forNumber(value); + } + + public static ConsistencySelectorCase forNumber(int value) { + switch (value) { + case 4: + return TRANSACTION; + case 5: + return NEW_TRANSACTION; + case 7: + return READ_TIME; + case 0: + return CONSISTENCYSELECTOR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConsistencySelectorCase getConsistencySelectorCase() { + return ConsistencySelectorCase.forNumber(consistencySelectorCase_); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + private volatile java.lang.Object database_; + /** + * + * + *
+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ 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();
+ database_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DOCUMENTS_FIELD_NUMBER = 2;
+ private com.google.protobuf.LazyStringList documents_;
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public com.google.protobuf.ProtocolStringList getDocumentsList() {
+ return documents_;
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public int getDocumentsCount() {
+ return documents_.size();
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public java.lang.String getDocuments(int index) {
+ return documents_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public com.google.protobuf.ByteString getDocumentsBytes(int index) {
+ return documents_.getByteString(index);
+ }
+
+ public static final int MASK_FIELD_NUMBER = 3;
+ private com.google.firestore.v1.DocumentMask mask_;
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public boolean hasMask() {
+ return mask_ != null;
+ }
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public com.google.firestore.v1.DocumentMask getMask() {
+ return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_;
+ }
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() {
+ return getMask();
+ }
+
+ public static final int TRANSACTION_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Reads documents in a transaction. + *+ * + *
bytes transaction = 4;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ if (consistencySelectorCase_ == 4) {
+ return (com.google.protobuf.ByteString) consistencySelector_;
+ }
+ return com.google.protobuf.ByteString.EMPTY;
+ }
+
+ public static final int NEW_TRANSACTION_FIELD_NUMBER = 5;
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public boolean hasNewTransaction() {
+ return consistencySelectorCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public com.google.firestore.v1.TransactionOptions getNewTransaction() {
+ if (consistencySelectorCase_ == 5) {
+ return (com.google.firestore.v1.TransactionOptions) consistencySelector_;
+ }
+ return com.google.firestore.v1.TransactionOptions.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() {
+ if (consistencySelectorCase_ == 5) {
+ return (com.google.firestore.v1.TransactionOptions) consistencySelector_;
+ }
+ return com.google.firestore.v1.TransactionOptions.getDefaultInstance();
+ }
+
+ public static final int READ_TIME_FIELD_NUMBER = 7;
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public boolean hasReadTime() {
+ return consistencySelectorCase_ == 7;
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (consistencySelectorCase_ == 7) {
+ return (com.google.protobuf.Timestamp) consistencySelector_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (consistencySelectorCase_ == 7) {
+ return (com.google.protobuf.Timestamp) consistencySelector_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getDatabaseBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_);
+ }
+ for (int i = 0; i < documents_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, documents_.getRaw(i));
+ }
+ if (mask_ != null) {
+ output.writeMessage(3, getMask());
+ }
+ if (consistencySelectorCase_ == 4) {
+ output.writeBytes(4, (com.google.protobuf.ByteString) consistencySelector_);
+ }
+ if (consistencySelectorCase_ == 5) {
+ output.writeMessage(5, (com.google.firestore.v1.TransactionOptions) consistencySelector_);
+ }
+ if (consistencySelectorCase_ == 7) {
+ output.writeMessage(7, (com.google.protobuf.Timestamp) consistencySelector_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDatabaseBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < documents_.size(); i++) {
+ dataSize += computeStringSizeNoTag(documents_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getDocumentsList().size();
+ }
+ if (mask_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMask());
+ }
+ if (consistencySelectorCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeBytesSize(
+ 4, (com.google.protobuf.ByteString) consistencySelector_);
+ }
+ if (consistencySelectorCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, (com.google.firestore.v1.TransactionOptions) consistencySelector_);
+ }
+ if (consistencySelectorCase_ == 7) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 7, (com.google.protobuf.Timestamp) consistencySelector_);
+ }
+ 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.v1.BatchGetDocumentsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.BatchGetDocumentsRequest other =
+ (com.google.firestore.v1.BatchGetDocumentsRequest) obj;
+
+ boolean result = true;
+ result = result && getDatabase().equals(other.getDatabase());
+ result = result && getDocumentsList().equals(other.getDocumentsList());
+ result = result && (hasMask() == other.hasMask());
+ if (hasMask()) {
+ result = result && getMask().equals(other.getMask());
+ }
+ result = result && getConsistencySelectorCase().equals(other.getConsistencySelectorCase());
+ if (!result) return false;
+ switch (consistencySelectorCase_) {
+ case 4:
+ result = result && getTransaction().equals(other.getTransaction());
+ break;
+ case 5:
+ result = result && getNewTransaction().equals(other.getNewTransaction());
+ break;
+ case 7:
+ result = result && getReadTime().equals(other.getReadTime());
+ break;
+ case 0:
+ default:
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DATABASE_FIELD_NUMBER;
+ hash = (53 * hash) + getDatabase().hashCode();
+ if (getDocumentsCount() > 0) {
+ hash = (37 * hash) + DOCUMENTS_FIELD_NUMBER;
+ hash = (53 * hash) + getDocumentsList().hashCode();
+ }
+ if (hasMask()) {
+ hash = (37 * hash) + MASK_FIELD_NUMBER;
+ hash = (53 * hash) + getMask().hashCode();
+ }
+ switch (consistencySelectorCase_) {
+ case 4:
+ hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getTransaction().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + NEW_TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getNewTransaction().hashCode();
+ break;
+ case 7:
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest 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.v1.BatchGetDocumentsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest 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.v1.BatchGetDocumentsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest 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.v1.BatchGetDocumentsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest 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.v1.BatchGetDocumentsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest 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.v1.BatchGetDocumentsRequest 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.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. + *+ * + * Protobuf type {@code google.firestore.v1.BatchGetDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ database_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder setDatabase(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder clearDatabase() {
+
+ database_ = getDefaultInstance().getDatabase();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList documents_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureDocumentsIsMutable() {
+ if (!((bitField0_ & 0x00000002) == 0x00000002)) {
+ documents_ = new com.google.protobuf.LazyStringArrayList(documents_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public com.google.protobuf.ProtocolStringList getDocumentsList() {
+ return documents_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public int getDocumentsCount() {
+ return documents_.size();
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public java.lang.String getDocuments(int index) {
+ return documents_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public com.google.protobuf.ByteString getDocumentsBytes(int index) {
+ return documents_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public Builder setDocuments(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureDocumentsIsMutable();
+ documents_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public Builder addDocuments(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureDocumentsIsMutable();
+ documents_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public Builder addAllDocuments(java.lang.Iterable+ * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public Builder clearDocuments() {
+ documents_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ public Builder addDocumentsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureDocumentsIsMutable();
+ documents_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private com.google.firestore.v1.DocumentMask mask_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.DocumentMask,
+ com.google.firestore.v1.DocumentMask.Builder,
+ com.google.firestore.v1.DocumentMaskOrBuilder>
+ maskBuilder_;
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public boolean hasMask() {
+ return maskBuilder_ != null || mask_ != null;
+ }
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public com.google.firestore.v1.DocumentMask getMask() {
+ if (maskBuilder_ == null) {
+ return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_;
+ } else {
+ return maskBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public Builder setMask(com.google.firestore.v1.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 a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public Builder setMask(com.google.firestore.v1.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 a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) {
+ if (maskBuilder_ == null) {
+ if (mask_ != null) {
+ mask_ =
+ com.google.firestore.v1.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 a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ 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 a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public com.google.firestore.v1.DocumentMask.Builder getMaskBuilder() {
+
+ onChanged();
+ return getMaskFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() {
+ if (maskBuilder_ != null) {
+ return maskBuilder_.getMessageOrBuilder();
+ } else {
+ return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.DocumentMask,
+ com.google.firestore.v1.DocumentMask.Builder,
+ com.google.firestore.v1.DocumentMaskOrBuilder>
+ getMaskFieldBuilder() {
+ if (maskBuilder_ == null) {
+ maskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.DocumentMask,
+ com.google.firestore.v1.DocumentMask.Builder,
+ com.google.firestore.v1.DocumentMaskOrBuilder>(
+ getMask(), getParentForChildren(), isClean());
+ mask_ = null;
+ }
+ return maskBuilder_;
+ }
+
+ /**
+ *
+ *
+ * + * Reads documents in a transaction. + *+ * + *
bytes transaction = 4;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ if (consistencySelectorCase_ == 4) {
+ return (com.google.protobuf.ByteString) consistencySelector_;
+ }
+ return com.google.protobuf.ByteString.EMPTY;
+ }
+ /**
+ *
+ *
+ * + * Reads documents in a transaction. + *+ * + *
bytes transaction = 4;
+ */
+ public Builder setTransaction(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ consistencySelectorCase_ = 4;
+ consistencySelector_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads documents in a transaction. + *+ * + *
bytes transaction = 4;
+ */
+ public Builder clearTransaction() {
+ if (consistencySelectorCase_ == 4) {
+ consistencySelectorCase_ = 0;
+ consistencySelector_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.TransactionOptions,
+ com.google.firestore.v1.TransactionOptions.Builder,
+ com.google.firestore.v1.TransactionOptionsOrBuilder>
+ newTransactionBuilder_;
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public boolean hasNewTransaction() {
+ return consistencySelectorCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public com.google.firestore.v1.TransactionOptions getNewTransaction() {
+ if (newTransactionBuilder_ == null) {
+ if (consistencySelectorCase_ == 5) {
+ return (com.google.firestore.v1.TransactionOptions) consistencySelector_;
+ }
+ return com.google.firestore.v1.TransactionOptions.getDefaultInstance();
+ } else {
+ if (consistencySelectorCase_ == 5) {
+ return newTransactionBuilder_.getMessage();
+ }
+ return com.google.firestore.v1.TransactionOptions.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public Builder setNewTransaction(com.google.firestore.v1.TransactionOptions value) {
+ if (newTransactionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ consistencySelector_ = value;
+ onChanged();
+ } else {
+ newTransactionBuilder_.setMessage(value);
+ }
+ consistencySelectorCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public Builder setNewTransaction(
+ com.google.firestore.v1.TransactionOptions.Builder builderForValue) {
+ if (newTransactionBuilder_ == null) {
+ consistencySelector_ = builderForValue.build();
+ onChanged();
+ } else {
+ newTransactionBuilder_.setMessage(builderForValue.build());
+ }
+ consistencySelectorCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public Builder mergeNewTransaction(com.google.firestore.v1.TransactionOptions value) {
+ if (newTransactionBuilder_ == null) {
+ if (consistencySelectorCase_ == 5
+ && consistencySelector_
+ != com.google.firestore.v1.TransactionOptions.getDefaultInstance()) {
+ consistencySelector_ =
+ com.google.firestore.v1.TransactionOptions.newBuilder(
+ (com.google.firestore.v1.TransactionOptions) consistencySelector_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ consistencySelector_ = value;
+ }
+ onChanged();
+ } else {
+ if (consistencySelectorCase_ == 5) {
+ newTransactionBuilder_.mergeFrom(value);
+ }
+ newTransactionBuilder_.setMessage(value);
+ }
+ consistencySelectorCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public Builder clearNewTransaction() {
+ if (newTransactionBuilder_ == null) {
+ if (consistencySelectorCase_ == 5) {
+ consistencySelectorCase_ = 0;
+ consistencySelector_ = null;
+ onChanged();
+ }
+ } else {
+ if (consistencySelectorCase_ == 5) {
+ consistencySelectorCase_ = 0;
+ consistencySelector_ = null;
+ }
+ newTransactionBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuilder() {
+ return getNewTransactionFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() {
+ if ((consistencySelectorCase_ == 5) && (newTransactionBuilder_ != null)) {
+ return newTransactionBuilder_.getMessageOrBuilder();
+ } else {
+ if (consistencySelectorCase_ == 5) {
+ return (com.google.firestore.v1.TransactionOptions) consistencySelector_;
+ }
+ return com.google.firestore.v1.TransactionOptions.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.TransactionOptions,
+ com.google.firestore.v1.TransactionOptions.Builder,
+ com.google.firestore.v1.TransactionOptionsOrBuilder>
+ getNewTransactionFieldBuilder() {
+ if (newTransactionBuilder_ == null) {
+ if (!(consistencySelectorCase_ == 5)) {
+ consistencySelector_ = com.google.firestore.v1.TransactionOptions.getDefaultInstance();
+ }
+ newTransactionBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.TransactionOptions,
+ com.google.firestore.v1.TransactionOptions.Builder,
+ com.google.firestore.v1.TransactionOptionsOrBuilder>(
+ (com.google.firestore.v1.TransactionOptions) consistencySelector_,
+ getParentForChildren(),
+ isClean());
+ consistencySelector_ = null;
+ }
+ consistencySelectorCase_ = 5;
+ onChanged();
+ ;
+ return newTransactionBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public boolean hasReadTime() {
+ return consistencySelectorCase_ == 7;
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ if (consistencySelectorCase_ == 7) {
+ return (com.google.protobuf.Timestamp) consistencySelector_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ } else {
+ if (consistencySelectorCase_ == 7) {
+ return readTimeBuilder_.getMessage();
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ consistencySelector_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+ consistencySelectorCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ consistencySelector_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+ consistencySelectorCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (consistencySelectorCase_ == 7
+ && consistencySelector_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ consistencySelector_ =
+ com.google.protobuf.Timestamp.newBuilder(
+ (com.google.protobuf.Timestamp) consistencySelector_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ consistencySelector_ = value;
+ }
+ onChanged();
+ } else {
+ if (consistencySelectorCase_ == 7) {
+ readTimeBuilder_.mergeFrom(value);
+ }
+ readTimeBuilder_.setMessage(value);
+ }
+ consistencySelectorCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ if (consistencySelectorCase_ == 7) {
+ consistencySelectorCase_ = 0;
+ consistencySelector_ = null;
+ onChanged();
+ }
+ } else {
+ if (consistencySelectorCase_ == 7) {
+ consistencySelectorCase_ = 0;
+ consistencySelector_ = null;
+ }
+ readTimeBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if ((consistencySelectorCase_ == 7) && (readTimeBuilder_ != null)) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ if (consistencySelectorCase_ == 7) {
+ return (com.google.protobuf.Timestamp) consistencySelector_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ if (!(consistencySelectorCase_ == 7)) {
+ consistencySelector_ = com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ (com.google.protobuf.Timestamp) consistencySelector_,
+ getParentForChildren(),
+ isClean());
+ consistencySelector_ = null;
+ }
+ consistencySelectorCase_ = 7;
+ onChanged();
+ ;
+ return readTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.BatchGetDocumentsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchGetDocumentsRequest)
+ private static final com.google.firestore.v1.BatchGetDocumentsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.BatchGetDocumentsRequest();
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ java.lang.String getDatabase();
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ com.google.protobuf.ByteString getDatabaseBytes();
+
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ java.util.List+ * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ int getDocumentsCount();
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ java.lang.String getDocuments(int index);
+ /**
+ *
+ *
+ * + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + *+ * + *
repeated string documents = 2;
+ */
+ com.google.protobuf.ByteString getDocumentsBytes(int index);
+
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ boolean hasMask();
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ com.google.firestore.v1.DocumentMask getMask();
+ /**
+ *
+ *
+ * + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + *+ * + *
.google.firestore.v1.DocumentMask mask = 3;
+ */
+ com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder();
+
+ /**
+ *
+ *
+ * + * Reads documents in a transaction. + *+ * + *
bytes transaction = 4;
+ */
+ com.google.protobuf.ByteString getTransaction();
+
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ boolean hasNewTransaction();
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ com.google.firestore.v1.TransactionOptions getNewTransaction();
+ /**
+ *
+ *
+ * + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + *+ * + *
.google.firestore.v1.TransactionOptions new_transaction = 5;
+ */
+ com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder();
+
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ public com.google.firestore.v1.BatchGetDocumentsRequest.ConsistencySelectorCase
+ getConsistencySelectorCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java
new file mode 100644
index 000000000000..641fae961f7d
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java
@@ -0,0 +1,1373 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/firestore.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. + *+ * + * Protobuf type {@code google.firestore.v1.BatchGetDocumentsResponse} + */ +public final class BatchGetDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchGetDocumentsResponse) + BatchGetDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchGetDocumentsResponse.newBuilder() to construct. + private BatchGetDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchGetDocumentsResponse() { + transaction_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchGetDocumentsResponse( + 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.v1.Document.Builder subBuilder = null; + if (resultCase_ == 1) { + subBuilder = ((com.google.firestore.v1.Document) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.firestore.v1.Document.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.firestore.v1.Document) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 1; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + resultCase_ = 2; + result_ = s; + break; + } + case 26: + { + transaction_ = input.readBytes(); + 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; + } + default: + { + if (!parseUnknownFieldProto3(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.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchGetDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchGetDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BatchGetDocumentsResponse.class, + com.google.firestore.v1.BatchGetDocumentsResponse.Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public enum ResultCase implements com.google.protobuf.Internal.EnumLite { + FOUND(1), + MISSING(2), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: + return FOUND; + case 2: + return MISSING; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int FOUND_FIELD_NUMBER = 1; + /** + * + * + *
+ * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public boolean hasFound() {
+ return resultCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public com.google.firestore.v1.Document getFound() {
+ if (resultCase_ == 1) {
+ return (com.google.firestore.v1.Document) result_;
+ }
+ return com.google.firestore.v1.Document.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() {
+ if (resultCase_ == 1) {
+ return (com.google.firestore.v1.Document) result_;
+ }
+ return com.google.firestore.v1.Document.getDefaultInstance();
+ }
+
+ public static final int MISSING_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public java.lang.String getMissing() {
+ java.lang.Object ref = "";
+ if (resultCase_ == 2) {
+ ref = result_;
+ }
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (resultCase_ == 2) {
+ result_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public com.google.protobuf.ByteString getMissingBytes() {
+ java.lang.Object ref = "";
+ if (resultCase_ == 2) {
+ ref = result_;
+ }
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ if (resultCase_ == 2) {
+ result_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TRANSACTION_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString transaction_;
+ /**
+ *
+ *
+ * + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + *+ * + *
bytes transaction = 3;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ return transaction_;
+ }
+
+ public static final int READ_TIME_FIELD_NUMBER = 4;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ 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 {
+ if (resultCase_ == 1) {
+ output.writeMessage(1, (com.google.firestore.v1.Document) result_);
+ }
+ if (resultCase_ == 2) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, result_);
+ }
+ if (!transaction_.isEmpty()) {
+ output.writeBytes(3, transaction_);
+ }
+ if (readTime_ != null) {
+ output.writeMessage(4, getReadTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (resultCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.firestore.v1.Document) result_);
+ }
+ if (resultCase_ == 2) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, result_);
+ }
+ if (!transaction_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, transaction_);
+ }
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadTime());
+ }
+ 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.v1.BatchGetDocumentsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.BatchGetDocumentsResponse other =
+ (com.google.firestore.v1.BatchGetDocumentsResponse) obj;
+
+ boolean result = true;
+ result = result && getTransaction().equals(other.getTransaction());
+ result = result && (hasReadTime() == other.hasReadTime());
+ if (hasReadTime()) {
+ result = result && getReadTime().equals(other.getReadTime());
+ }
+ result = result && getResultCase().equals(other.getResultCase());
+ if (!result) return false;
+ switch (resultCase_) {
+ case 1:
+ result = result && getFound().equals(other.getFound());
+ break;
+ case 2:
+ result = result && getMissing().equals(other.getMissing());
+ break;
+ case 0:
+ default:
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getTransaction().hashCode();
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
+ switch (resultCase_) {
+ case 1:
+ hash = (37 * hash) + FOUND_FIELD_NUMBER;
+ hash = (53 * hash) + getFound().hashCode();
+ break;
+ case 2:
+ hash = (37 * hash) + MISSING_FIELD_NUMBER;
+ hash = (53 * hash) + getMissing().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse 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.v1.BatchGetDocumentsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse 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.v1.BatchGetDocumentsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse 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.v1.BatchGetDocumentsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse 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.v1.BatchGetDocumentsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse 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.v1.BatchGetDocumentsResponse 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 streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. + *+ * + * Protobuf type {@code google.firestore.v1.BatchGetDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public boolean hasFound() {
+ return resultCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public com.google.firestore.v1.Document getFound() {
+ if (foundBuilder_ == null) {
+ if (resultCase_ == 1) {
+ return (com.google.firestore.v1.Document) result_;
+ }
+ return com.google.firestore.v1.Document.getDefaultInstance();
+ } else {
+ if (resultCase_ == 1) {
+ return foundBuilder_.getMessage();
+ }
+ return com.google.firestore.v1.Document.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public Builder setFound(com.google.firestore.v1.Document value) {
+ if (foundBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result_ = value;
+ onChanged();
+ } else {
+ foundBuilder_.setMessage(value);
+ }
+ resultCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public Builder setFound(com.google.firestore.v1.Document.Builder builderForValue) {
+ if (foundBuilder_ == null) {
+ result_ = builderForValue.build();
+ onChanged();
+ } else {
+ foundBuilder_.setMessage(builderForValue.build());
+ }
+ resultCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public Builder mergeFound(com.google.firestore.v1.Document value) {
+ if (foundBuilder_ == null) {
+ if (resultCase_ == 1 && result_ != com.google.firestore.v1.Document.getDefaultInstance()) {
+ result_ =
+ com.google.firestore.v1.Document.newBuilder(
+ (com.google.firestore.v1.Document) result_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ result_ = value;
+ }
+ onChanged();
+ } else {
+ if (resultCase_ == 1) {
+ foundBuilder_.mergeFrom(value);
+ }
+ foundBuilder_.setMessage(value);
+ }
+ resultCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public Builder clearFound() {
+ if (foundBuilder_ == null) {
+ if (resultCase_ == 1) {
+ resultCase_ = 0;
+ result_ = null;
+ onChanged();
+ }
+ } else {
+ if (resultCase_ == 1) {
+ resultCase_ = 0;
+ result_ = null;
+ }
+ foundBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public com.google.firestore.v1.Document.Builder getFoundBuilder() {
+ return getFoundFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() {
+ if ((resultCase_ == 1) && (foundBuilder_ != null)) {
+ return foundBuilder_.getMessageOrBuilder();
+ } else {
+ if (resultCase_ == 1) {
+ return (com.google.firestore.v1.Document) result_;
+ }
+ return com.google.firestore.v1.Document.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>
+ getFoundFieldBuilder() {
+ if (foundBuilder_ == null) {
+ if (!(resultCase_ == 1)) {
+ result_ = com.google.firestore.v1.Document.getDefaultInstance();
+ }
+ foundBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>(
+ (com.google.firestore.v1.Document) result_, getParentForChildren(), isClean());
+ result_ = null;
+ }
+ resultCase_ = 1;
+ onChanged();
+ ;
+ return foundBuilder_;
+ }
+
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public java.lang.String getMissing() {
+ java.lang.Object ref = "";
+ if (resultCase_ == 2) {
+ ref = result_;
+ }
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (resultCase_ == 2) {
+ result_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public com.google.protobuf.ByteString getMissingBytes() {
+ java.lang.Object ref = "";
+ if (resultCase_ == 2) {
+ ref = result_;
+ }
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ if (resultCase_ == 2) {
+ result_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public Builder setMissing(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ resultCase_ = 2;
+ result_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public Builder clearMissing() {
+ if (resultCase_ == 2) {
+ resultCase_ = 0;
+ result_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ public Builder setMissingBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ resultCase_ = 2;
+ result_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ * + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + *+ * + *
bytes transaction = 3;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ return transaction_;
+ }
+ /**
+ *
+ *
+ * + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + *+ * + *
bytes transaction = 3;
+ */
+ public Builder setTransaction(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ transaction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + *+ * + *
bytes transaction = 3;
+ */
+ public Builder clearTransaction() {
+
+ transaction_ = getDefaultInstance().getTransaction();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp readTime_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.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 time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.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 time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.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 time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.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 time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.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.setUnknownFieldsProto3(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.v1.BatchGetDocumentsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchGetDocumentsResponse)
+ private static final com.google.firestore.v1.BatchGetDocumentsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.BatchGetDocumentsResponse();
+ }
+
+ public static com.google.firestore.v1.BatchGetDocumentsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ boolean hasFound();
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ com.google.firestore.v1.Document getFound();
+ /**
+ *
+ *
+ * + * A document that was requested. + *+ * + *
.google.firestore.v1.Document found = 1;
+ */
+ com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder();
+
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ java.lang.String getMissing();
+ /**
+ *
+ *
+ * + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string missing = 2;
+ */
+ com.google.protobuf.ByteString getMissingBytes();
+
+ /**
+ *
+ *
+ * + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + *+ * + *
bytes transaction = 3;
+ */
+ com.google.protobuf.ByteString getTransaction();
+
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
+ public com.google.firestore.v1.BatchGetDocumentsResponse.ResultCase getResultCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java
new file mode 100644
index 000000000000..af42d2e00f96
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java
@@ -0,0 +1,883 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/firestore.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. + *+ * + * Protobuf type {@code google.firestore.v1.BeginTransactionRequest} + */ +public final class BeginTransactionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BeginTransactionRequest) + BeginTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BeginTransactionRequest.newBuilder() to construct. + private BeginTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BeginTransactionRequest() { + database_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BeginTransactionRequest( + 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(); + + database_ = s; + break; + } + case 18: + { + com.google.firestore.v1.TransactionOptions.Builder subBuilder = null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = + input.readMessage( + com.google.firestore.v1.TransactionOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(options_); + options_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(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.v1.FirestoreProto + .internal_static_google_firestore_v1_BeginTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BeginTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BeginTransactionRequest.class, + com.google.firestore.v1.BeginTransactionRequest.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + private volatile java.lang.Object database_; + /** + * + * + *
+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ 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();
+ database_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int OPTIONS_FIELD_NUMBER = 2;
+ private com.google.firestore.v1.TransactionOptions options_;
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public boolean hasOptions() {
+ return options_ != null;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public com.google.firestore.v1.TransactionOptions getOptions() {
+ return options_ == null
+ ? com.google.firestore.v1.TransactionOptions.getDefaultInstance()
+ : options_;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public com.google.firestore.v1.TransactionOptionsOrBuilder getOptionsOrBuilder() {
+ return getOptions();
+ }
+
+ 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 (!getDatabaseBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_);
+ }
+ if (options_ != null) {
+ output.writeMessage(2, getOptions());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDatabaseBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_);
+ }
+ if (options_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOptions());
+ }
+ 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.v1.BeginTransactionRequest)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.BeginTransactionRequest other =
+ (com.google.firestore.v1.BeginTransactionRequest) obj;
+
+ boolean result = true;
+ result = result && getDatabase().equals(other.getDatabase());
+ result = result && (hasOptions() == other.hasOptions());
+ if (hasOptions()) {
+ result = result && getOptions().equals(other.getOptions());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DATABASE_FIELD_NUMBER;
+ hash = (53 * hash) + getDatabase().hashCode();
+ if (hasOptions()) {
+ hash = (37 * hash) + OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getOptions().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest 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.v1.BeginTransactionRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest 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.v1.BeginTransactionRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest 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.v1.BeginTransactionRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest 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.v1.BeginTransactionRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest 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.v1.BeginTransactionRequest 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.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. + *+ * + * Protobuf type {@code google.firestore.v1.BeginTransactionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ database_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder setDatabase(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder clearDatabase() {
+
+ database_ = getDefaultInstance().getDatabase();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.firestore.v1.TransactionOptions options_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.TransactionOptions,
+ com.google.firestore.v1.TransactionOptions.Builder,
+ com.google.firestore.v1.TransactionOptionsOrBuilder>
+ optionsBuilder_;
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public boolean hasOptions() {
+ return optionsBuilder_ != null || options_ != null;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public com.google.firestore.v1.TransactionOptions getOptions() {
+ if (optionsBuilder_ == null) {
+ return options_ == null
+ ? com.google.firestore.v1.TransactionOptions.getDefaultInstance()
+ : options_;
+ } else {
+ return optionsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public Builder setOptions(com.google.firestore.v1.TransactionOptions value) {
+ if (optionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ options_ = value;
+ onChanged();
+ } else {
+ optionsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public Builder setOptions(com.google.firestore.v1.TransactionOptions.Builder builderForValue) {
+ if (optionsBuilder_ == null) {
+ options_ = builderForValue.build();
+ onChanged();
+ } else {
+ optionsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public Builder mergeOptions(com.google.firestore.v1.TransactionOptions value) {
+ if (optionsBuilder_ == null) {
+ if (options_ != null) {
+ options_ =
+ com.google.firestore.v1.TransactionOptions.newBuilder(options_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ options_ = value;
+ }
+ onChanged();
+ } else {
+ optionsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public Builder clearOptions() {
+ if (optionsBuilder_ == null) {
+ options_ = null;
+ onChanged();
+ } else {
+ options_ = null;
+ optionsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public com.google.firestore.v1.TransactionOptions.Builder getOptionsBuilder() {
+
+ onChanged();
+ return getOptionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ public com.google.firestore.v1.TransactionOptionsOrBuilder getOptionsOrBuilder() {
+ if (optionsBuilder_ != null) {
+ return optionsBuilder_.getMessageOrBuilder();
+ } else {
+ return options_ == null
+ ? com.google.firestore.v1.TransactionOptions.getDefaultInstance()
+ : options_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.TransactionOptions,
+ com.google.firestore.v1.TransactionOptions.Builder,
+ com.google.firestore.v1.TransactionOptionsOrBuilder>
+ getOptionsFieldBuilder() {
+ if (optionsBuilder_ == null) {
+ optionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.TransactionOptions,
+ com.google.firestore.v1.TransactionOptions.Builder,
+ com.google.firestore.v1.TransactionOptionsOrBuilder>(
+ getOptions(), getParentForChildren(), isClean());
+ options_ = null;
+ }
+ return optionsBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.BeginTransactionRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.BeginTransactionRequest)
+ private static final com.google.firestore.v1.BeginTransactionRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.BeginTransactionRequest();
+ }
+
+ public static com.google.firestore.v1.BeginTransactionRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ java.lang.String getDatabase();
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ com.google.protobuf.ByteString getDatabaseBytes();
+
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ boolean hasOptions();
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ com.google.firestore.v1.TransactionOptions getOptions();
+ /**
+ *
+ *
+ * + * The options for the transaction. + * Defaults to a read-write transaction. + *+ * + *
.google.firestore.v1.TransactionOptions options = 2;
+ */
+ com.google.firestore.v1.TransactionOptionsOrBuilder getOptionsOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java
new file mode 100644
index 000000000000..e6e333802284
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java
@@ -0,0 +1,520 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/firestore.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. + *+ * + * Protobuf type {@code google.firestore.v1.BeginTransactionResponse} + */ +public final class BeginTransactionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BeginTransactionResponse) + BeginTransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BeginTransactionResponse.newBuilder() to construct. + private BeginTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BeginTransactionResponse() { + transaction_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BeginTransactionResponse( + 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: + { + transaction_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownFieldProto3(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.v1.FirestoreProto + .internal_static_google_firestore_v1_BeginTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BeginTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BeginTransactionResponse.class, + com.google.firestore.v1.BeginTransactionResponse.Builder.class); + } + + public static final int TRANSACTION_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString transaction_; + /** + * + * + *
+ * The transaction that was started. + *+ * + *
bytes transaction = 1;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ return transaction_;
+ }
+
+ 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 (!transaction_.isEmpty()) {
+ output.writeBytes(1, transaction_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!transaction_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, transaction_);
+ }
+ 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.v1.BeginTransactionResponse)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.BeginTransactionResponse other =
+ (com.google.firestore.v1.BeginTransactionResponse) obj;
+
+ boolean result = true;
+ result = result && getTransaction().equals(other.getTransaction());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getTransaction().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse 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.v1.BeginTransactionResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse 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.v1.BeginTransactionResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse 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.v1.BeginTransactionResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse 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.v1.BeginTransactionResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse 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.v1.BeginTransactionResponse 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 response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. + *+ * + * Protobuf type {@code google.firestore.v1.BeginTransactionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The transaction that was started. + *+ * + *
bytes transaction = 1;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ return transaction_;
+ }
+ /**
+ *
+ *
+ * + * The transaction that was started. + *+ * + *
bytes transaction = 1;
+ */
+ public Builder setTransaction(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ transaction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The transaction that was started. + *+ * + *
bytes transaction = 1;
+ */
+ public Builder clearTransaction() {
+
+ transaction_ = getDefaultInstance().getTransaction();
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.BeginTransactionResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.BeginTransactionResponse)
+ private static final com.google.firestore.v1.BeginTransactionResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.BeginTransactionResponse();
+ }
+
+ public static com.google.firestore.v1.BeginTransactionResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The transaction that was started. + *+ * + *
bytes transaction = 1;
+ */
+ com.google.protobuf.ByteString getTransaction();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java
new file mode 100644
index 000000000000..a098bdc6f5df
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java
@@ -0,0 +1,1194 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/firestore.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. + *+ * + * Protobuf type {@code google.firestore.v1.CommitRequest} + */ +public final class CommitRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.CommitRequest) + CommitRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommitRequest.newBuilder() to construct. + private CommitRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CommitRequest() { + database_ = ""; + writes_ = java.util.Collections.emptyList(); + transaction_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CommitRequest( + 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(); + + database_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + writes_ = new java.util.ArrayList
+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ 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();
+ database_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int WRITES_FIELD_NUMBER = 2;
+ private java.util.List+ * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public java.util.List+ * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public java.util.List extends com.google.firestore.v1.WriteOrBuilder> getWritesOrBuilderList() {
+ return writes_;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public int getWritesCount() {
+ return writes_.size();
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.Write getWrites(int index) {
+ return writes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) {
+ return writes_.get(index);
+ }
+
+ public static final int TRANSACTION_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString transaction_;
+ /**
+ *
+ *
+ * + * If set, applies all writes in this transaction, and commits it. + *+ * + *
bytes transaction = 3;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ return transaction_;
+ }
+
+ 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 (!getDatabaseBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_);
+ }
+ for (int i = 0; i < writes_.size(); i++) {
+ output.writeMessage(2, writes_.get(i));
+ }
+ if (!transaction_.isEmpty()) {
+ output.writeBytes(3, transaction_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDatabaseBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_);
+ }
+ for (int i = 0; i < writes_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, writes_.get(i));
+ }
+ if (!transaction_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, transaction_);
+ }
+ 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.v1.CommitRequest)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.CommitRequest other = (com.google.firestore.v1.CommitRequest) obj;
+
+ boolean result = true;
+ result = result && getDatabase().equals(other.getDatabase());
+ result = result && getWritesList().equals(other.getWritesList());
+ result = result && getTransaction().equals(other.getTransaction());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DATABASE_FIELD_NUMBER;
+ hash = (53 * hash) + getDatabase().hashCode();
+ if (getWritesCount() > 0) {
+ hash = (37 * hash) + WRITES_FIELD_NUMBER;
+ hash = (53 * hash) + getWritesList().hashCode();
+ }
+ hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getTransaction().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.CommitRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CommitRequest 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.v1.CommitRequest parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CommitRequest 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.v1.CommitRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CommitRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.CommitRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.CommitRequest 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.v1.CommitRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.CommitRequest 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.v1.CommitRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.CommitRequest 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.v1.CommitRequest 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.Commit][google.firestore.v1.Firestore.Commit]. + *+ * + * Protobuf type {@code google.firestore.v1.CommitRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ database_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder setDatabase(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder clearDatabase() {
+
+ database_ = getDefaultInstance().getDatabase();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public java.util.List+ * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public int getWritesCount() {
+ if (writesBuilder_ == null) {
+ return writes_.size();
+ } else {
+ return writesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.Write getWrites(int index) {
+ if (writesBuilder_ == null) {
+ return writes_.get(index);
+ } else {
+ return writesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder setWrites(int index, com.google.firestore.v1.Write value) {
+ if (writesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWritesIsMutable();
+ writes_.set(index, value);
+ onChanged();
+ } else {
+ writesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder setWrites(int index, com.google.firestore.v1.Write.Builder builderForValue) {
+ if (writesBuilder_ == null) {
+ ensureWritesIsMutable();
+ writes_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ writesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder addWrites(com.google.firestore.v1.Write value) {
+ if (writesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWritesIsMutable();
+ writes_.add(value);
+ onChanged();
+ } else {
+ writesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder addWrites(int index, com.google.firestore.v1.Write value) {
+ if (writesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWritesIsMutable();
+ writes_.add(index, value);
+ onChanged();
+ } else {
+ writesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder addWrites(com.google.firestore.v1.Write.Builder builderForValue) {
+ if (writesBuilder_ == null) {
+ ensureWritesIsMutable();
+ writes_.add(builderForValue.build());
+ onChanged();
+ } else {
+ writesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder addWrites(int index, com.google.firestore.v1.Write.Builder builderForValue) {
+ if (writesBuilder_ == null) {
+ ensureWritesIsMutable();
+ writes_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ writesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder addAllWrites(
+ java.lang.Iterable extends com.google.firestore.v1.Write> values) {
+ if (writesBuilder_ == null) {
+ ensureWritesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, writes_);
+ onChanged();
+ } else {
+ writesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder clearWrites() {
+ if (writesBuilder_ == null) {
+ writes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ writesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public Builder removeWrites(int index) {
+ if (writesBuilder_ == null) {
+ ensureWritesIsMutable();
+ writes_.remove(index);
+ onChanged();
+ } else {
+ writesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.Write.Builder getWritesBuilder(int index) {
+ return getWritesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) {
+ if (writesBuilder_ == null) {
+ return writes_.get(index);
+ } else {
+ return writesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public java.util.List extends com.google.firestore.v1.WriteOrBuilder>
+ getWritesOrBuilderList() {
+ if (writesBuilder_ != null) {
+ return writesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(writes_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.Write.Builder addWritesBuilder() {
+ return getWritesFieldBuilder().addBuilder(com.google.firestore.v1.Write.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public com.google.firestore.v1.Write.Builder addWritesBuilder(int index) {
+ return getWritesFieldBuilder()
+ .addBuilder(index, com.google.firestore.v1.Write.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ public java.util.List+ * If set, applies all writes in this transaction, and commits it. + *+ * + *
bytes transaction = 3;
+ */
+ public com.google.protobuf.ByteString getTransaction() {
+ return transaction_;
+ }
+ /**
+ *
+ *
+ * + * If set, applies all writes in this transaction, and commits it. + *+ * + *
bytes transaction = 3;
+ */
+ public Builder setTransaction(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ transaction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If set, applies all writes in this transaction, and commits it. + *+ * + *
bytes transaction = 3;
+ */
+ public Builder clearTransaction() {
+
+ transaction_ = getDefaultInstance().getTransaction();
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.CommitRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.CommitRequest)
+ private static final com.google.firestore.v1.CommitRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.CommitRequest();
+ }
+
+ public static com.google.firestore.v1.CommitRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ java.lang.String getDatabase();
+ /**
+ *
+ *
+ * + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + *+ * + *
string database = 1;
+ */
+ com.google.protobuf.ByteString getDatabaseBytes();
+
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ java.util.List+ * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ com.google.firestore.v1.Write getWrites(int index);
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ int getWritesCount();
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ java.util.List extends com.google.firestore.v1.WriteOrBuilder> getWritesOrBuilderList();
+ /**
+ *
+ *
+ * + * The writes to apply. + * Always executed atomically and in order. + *+ * + *
repeated .google.firestore.v1.Write writes = 2;
+ */
+ com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * If set, applies all writes in this transaction, and commits it. + *+ * + *
bytes transaction = 3;
+ */
+ com.google.protobuf.ByteString getTransaction();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java
new file mode 100644
index 000000000000..3afba5cac924
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java
@@ -0,0 +1,1234 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/firestore.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. + *+ * + * Protobuf type {@code google.firestore.v1.CommitResponse} + */ +public final class CommitResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.CommitResponse) + CommitResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommitResponse.newBuilder() to construct. + private CommitResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CommitResponse() { + writeResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CommitResponse( + 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) == 0x00000001)) { + writeResults_ = new java.util.ArrayList
+ * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public java.util.List+ * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public java.util.List extends com.google.firestore.v1.WriteResultOrBuilder>
+ getWriteResultsOrBuilderList() {
+ return writeResults_;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public int getWriteResultsCount() {
+ return writeResults_.size();
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResult getWriteResults(int index) {
+ return writeResults_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) {
+ return writeResults_.get(index);
+ }
+
+ public static final int COMMIT_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp commitTime_;
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public boolean hasCommitTime() {
+ return commitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public com.google.protobuf.Timestamp getCommitTime() {
+ return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
+ return getCommitTime();
+ }
+
+ 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 < writeResults_.size(); i++) {
+ output.writeMessage(1, writeResults_.get(i));
+ }
+ if (commitTime_ != null) {
+ output.writeMessage(2, getCommitTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < writeResults_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, writeResults_.get(i));
+ }
+ if (commitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCommitTime());
+ }
+ 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.v1.CommitResponse)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.CommitResponse other = (com.google.firestore.v1.CommitResponse) obj;
+
+ boolean result = true;
+ result = result && getWriteResultsList().equals(other.getWriteResultsList());
+ result = result && (hasCommitTime() == other.hasCommitTime());
+ if (hasCommitTime()) {
+ result = result && getCommitTime().equals(other.getCommitTime());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getWriteResultsCount() > 0) {
+ hash = (37 * hash) + WRITE_RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getWriteResultsList().hashCode();
+ }
+ if (hasCommitTime()) {
+ hash = (37 * hash) + COMMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getCommitTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.v1.CommitResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CommitResponse 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.v1.CommitResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CommitResponse 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.v1.CommitResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CommitResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.CommitResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.CommitResponse 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.v1.CommitResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.CommitResponse 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.v1.CommitResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.CommitResponse 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.v1.CommitResponse 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 response for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. + *+ * + * Protobuf type {@code google.firestore.v1.CommitResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public java.util.List+ * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public int getWriteResultsCount() {
+ if (writeResultsBuilder_ == null) {
+ return writeResults_.size();
+ } else {
+ return writeResultsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResult getWriteResults(int index) {
+ if (writeResultsBuilder_ == null) {
+ return writeResults_.get(index);
+ } else {
+ return writeResultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder setWriteResults(int index, com.google.firestore.v1.WriteResult value) {
+ if (writeResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWriteResultsIsMutable();
+ writeResults_.set(index, value);
+ onChanged();
+ } else {
+ writeResultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder setWriteResults(
+ int index, com.google.firestore.v1.WriteResult.Builder builderForValue) {
+ if (writeResultsBuilder_ == null) {
+ ensureWriteResultsIsMutable();
+ writeResults_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ writeResultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder addWriteResults(com.google.firestore.v1.WriteResult value) {
+ if (writeResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWriteResultsIsMutable();
+ writeResults_.add(value);
+ onChanged();
+ } else {
+ writeResultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder addWriteResults(int index, com.google.firestore.v1.WriteResult value) {
+ if (writeResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWriteResultsIsMutable();
+ writeResults_.add(index, value);
+ onChanged();
+ } else {
+ writeResultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder addWriteResults(com.google.firestore.v1.WriteResult.Builder builderForValue) {
+ if (writeResultsBuilder_ == null) {
+ ensureWriteResultsIsMutable();
+ writeResults_.add(builderForValue.build());
+ onChanged();
+ } else {
+ writeResultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder addWriteResults(
+ int index, com.google.firestore.v1.WriteResult.Builder builderForValue) {
+ if (writeResultsBuilder_ == null) {
+ ensureWriteResultsIsMutable();
+ writeResults_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ writeResultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder addAllWriteResults(
+ java.lang.Iterable extends com.google.firestore.v1.WriteResult> values) {
+ if (writeResultsBuilder_ == null) {
+ ensureWriteResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, writeResults_);
+ onChanged();
+ } else {
+ writeResultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder clearWriteResults() {
+ if (writeResultsBuilder_ == null) {
+ writeResults_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ writeResultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public Builder removeWriteResults(int index) {
+ if (writeResultsBuilder_ == null) {
+ ensureWriteResultsIsMutable();
+ writeResults_.remove(index);
+ onChanged();
+ } else {
+ writeResultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResult.Builder getWriteResultsBuilder(int index) {
+ return getWriteResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) {
+ if (writeResultsBuilder_ == null) {
+ return writeResults_.get(index);
+ } else {
+ return writeResultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public java.util.List extends com.google.firestore.v1.WriteResultOrBuilder>
+ getWriteResultsOrBuilderList() {
+ if (writeResultsBuilder_ != null) {
+ return writeResultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(writeResults_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder() {
+ return getWriteResultsFieldBuilder()
+ .addBuilder(com.google.firestore.v1.WriteResult.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int index) {
+ return getWriteResultsFieldBuilder()
+ .addBuilder(index, com.google.firestore.v1.WriteResult.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ public java.util.List+ * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public boolean hasCommitTime() {
+ return commitTimeBuilder_ != null || commitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public com.google.protobuf.Timestamp getCommitTime() {
+ if (commitTimeBuilder_ == null) {
+ return commitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTime_;
+ } else {
+ return commitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public Builder setCommitTime(com.google.protobuf.Timestamp value) {
+ if (commitTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ commitTime_ = value;
+ onChanged();
+ } else {
+ commitTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (commitTimeBuilder_ == null) {
+ commitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ commitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public Builder mergeCommitTime(com.google.protobuf.Timestamp value) {
+ if (commitTimeBuilder_ == null) {
+ if (commitTime_ != null) {
+ commitTime_ =
+ com.google.protobuf.Timestamp.newBuilder(commitTime_).mergeFrom(value).buildPartial();
+ } else {
+ commitTime_ = value;
+ }
+ onChanged();
+ } else {
+ commitTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public Builder clearCommitTime() {
+ if (commitTimeBuilder_ == null) {
+ commitTime_ = null;
+ onChanged();
+ } else {
+ commitTime_ = null;
+ commitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() {
+
+ onChanged();
+ return getCommitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
+ if (commitTimeBuilder_ != null) {
+ return commitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return commitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCommitTimeFieldBuilder() {
+ if (commitTimeBuilder_ == null) {
+ commitTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCommitTime(), getParentForChildren(), isClean());
+ commitTime_ = null;
+ }
+ return commitTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.CommitResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.CommitResponse)
+ private static final com.google.firestore.v1.CommitResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.CommitResponse();
+ }
+
+ public static com.google.firestore.v1.CommitResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ java.util.List+ * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + *+ * + *
repeated .google.firestore.v1.WriteResult write_results = 1;
+ */
+ com.google.firestore.v1.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.v1.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.v1.WriteResult write_results = 1;
+ */
+ java.util.List extends com.google.firestore.v1.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.v1.WriteResult write_results = 1;
+ */
+ com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ boolean hasCommitTime();
+ /**
+ *
+ *
+ * + * The time at which the commit occurred. + *+ * + *
.google.protobuf.Timestamp commit_time = 2;
+ */
+ 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/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java
new file mode 100644
index 000000000000..84047cf6c4ec
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommonProto.java
@@ -0,0 +1,124 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/common.proto
+
+package com.google.firestore.v1;
+
+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_v1_DocumentMask_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_firestore_v1_DocumentMask_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_v1_Precondition_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_firestore_v1_Precondition_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_v1_TransactionOptions_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_firestore_v1_TransactionOptions_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_v1_TransactionOptions_ReadWrite_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_firestore_v1_TransactionOptions_ReadWrite_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_v1_TransactionOptions_ReadOnly_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_firestore_v1_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/v1/common.proto\022\023goog"
+ + "le.firestore.v1\032\034google/api/annotations."
+ + "proto\032\037google/protobuf/timestamp.proto\"#"
+ + "\n\014DocumentMask\022\023\n\013field_paths\030\001 \003(\t\"e\n\014P"
+ + "recondition\022\020\n\006exists\030\001 \001(\010H\000\0221\n\013update_"
+ + "time\030\002 \001(\0132\032.google.protobuf.TimestampH\000"
+ + "B\020\n\016condition_type\"\251\002\n\022TransactionOption"
+ + "s\022E\n\tread_only\030\002 \001(\01320.google.firestore."
+ + "v1.TransactionOptions.ReadOnlyH\000\022G\n\nread"
+ + "_write\030\003 \001(\01321.google.firestore.v1.Trans"
+ + "actionOptions.ReadWriteH\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.google.protobuf.Times"
+ + "tampH\000B\026\n\024consistency_selectorB\006\n\004modeB\245"
+ + "\001\n\027com.google.firestore.v1B\013CommonProtoP"
+ + "\001Z+ * 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;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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_;
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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.v1.Document document_;
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public boolean hasDocument() {
+ return document_ != null;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public com.google.firestore.v1.Document getDocument() {
+ return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() {
+ return getDocument();
+ }
+
+ public static final int MASK_FIELD_NUMBER = 5;
+ private com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ 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.v1.DocumentMask mask = 5;
+ */
+ public com.google.firestore.v1.DocumentMask getMask() {
+ return mask_ == null ? com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ public com.google.firestore.v1.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.v1.CreateDocumentRequest)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.CreateDocumentRequest other =
+ (com.google.firestore.v1.CreateDocumentRequest) obj;
+
+ boolean result = true;
+ result = result && getParent().equals(other.getParent());
+ result = result && getCollectionId().equals(other.getCollectionId());
+ result = result && getDocumentId().equals(other.getDocumentId());
+ result = result && (hasDocument() == other.hasDocument());
+ if (hasDocument()) {
+ result = result && getDocument().equals(other.getDocument());
+ }
+ result = result && (hasMask() == other.hasMask());
+ if (hasMask()) {
+ result = result && getMask().equals(other.getMask());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1.CreateDocumentRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.CreateDocumentRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.CreateDocumentRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.CreateDocumentRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.CreateDocumentRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.CreateDocumentRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.CreateDocumentRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.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.v1.Firestore.CreateDocument]. + *+ * + * Protobuf type {@code google.firestore.v1.CreateDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * 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;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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;
+ */
+ 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_ = "";
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ public Builder setCollectionId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ collectionId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ public Builder clearCollectionId() {
+
+ collectionId_ = getDefaultInstance().getCollectionId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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.v1.Document document_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>
+ documentBuilder_;
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public boolean hasDocument() {
+ return documentBuilder_ != null || document_ != null;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public com.google.firestore.v1.Document getDocument() {
+ if (documentBuilder_ == null) {
+ return document_ == null
+ ? com.google.firestore.v1.Document.getDefaultInstance()
+ : document_;
+ } else {
+ return documentBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public Builder setDocument(com.google.firestore.v1.Document value) {
+ if (documentBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ document_ = value;
+ onChanged();
+ } else {
+ documentBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public Builder setDocument(com.google.firestore.v1.Document.Builder builderForValue) {
+ if (documentBuilder_ == null) {
+ document_ = builderForValue.build();
+ onChanged();
+ } else {
+ documentBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public Builder mergeDocument(com.google.firestore.v1.Document value) {
+ if (documentBuilder_ == null) {
+ if (document_ != null) {
+ document_ =
+ com.google.firestore.v1.Document.newBuilder(document_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ document_ = value;
+ }
+ onChanged();
+ } else {
+ documentBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public Builder clearDocument() {
+ if (documentBuilder_ == null) {
+ document_ = null;
+ onChanged();
+ } else {
+ document_ = null;
+ documentBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public com.google.firestore.v1.Document.Builder getDocumentBuilder() {
+
+ onChanged();
+ return getDocumentFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() {
+ if (documentBuilder_ != null) {
+ return documentBuilder_.getMessageOrBuilder();
+ } else {
+ return document_ == null
+ ? com.google.firestore.v1.Document.getDefaultInstance()
+ : document_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>
+ getDocumentFieldBuilder() {
+ if (documentBuilder_ == null) {
+ documentBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>(
+ getDocument(), getParentForChildren(), isClean());
+ document_ = null;
+ }
+ return documentBuilder_;
+ }
+
+ private com.google.firestore.v1.DocumentMask mask_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.DocumentMask,
+ com.google.firestore.v1.DocumentMask.Builder,
+ com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ 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.v1.DocumentMask mask = 5;
+ */
+ public com.google.firestore.v1.DocumentMask getMask() {
+ if (maskBuilder_ == null) {
+ return mask_ == null ? com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ public Builder setMask(com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ public Builder setMask(com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ public Builder mergeMask(com.google.firestore.v1.DocumentMask value) {
+ if (maskBuilder_ == null) {
+ if (mask_ != null) {
+ mask_ =
+ com.google.firestore.v1.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.v1.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.v1.DocumentMask mask = 5;
+ */
+ public com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() {
+ if (maskBuilder_ != null) {
+ return maskBuilder_.getMessageOrBuilder();
+ } else {
+ return mask_ == null ? com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.DocumentMask,
+ com.google.firestore.v1.DocumentMask.Builder,
+ com.google.firestore.v1.DocumentMaskOrBuilder>
+ getMaskFieldBuilder() {
+ if (maskBuilder_ == null) {
+ maskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.DocumentMask,
+ com.google.firestore.v1.DocumentMask.Builder,
+ com.google.firestore.v1.DocumentMaskOrBuilder>(
+ getMask(), getParentForChildren(), isClean());
+ mask_ = null;
+ }
+ return maskBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.CreateDocumentRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.CreateDocumentRequest)
+ private static final com.google.firestore.v1.CreateDocumentRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.CreateDocumentRequest();
+ }
+
+ public static com.google.firestore.v1.CreateDocumentRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * 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;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * 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;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ java.lang.String getCollectionId();
+ /**
+ *
+ *
+ * + * The collection ID, relative to `parent`, to list. For example: `chatrooms`. + *+ * + *
string collection_id = 2;
+ */
+ 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;
+ */
+ 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;
+ */
+ com.google.protobuf.ByteString getDocumentIdBytes();
+
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ boolean hasDocument();
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ com.google.firestore.v1.Document getDocument();
+ /**
+ *
+ *
+ * + * The document to create. `name` must not be set. + *+ * + *
.google.firestore.v1.Document document = 4;
+ */
+ com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ 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.v1.DocumentMask mask = 5;
+ */
+ com.google.firestore.v1.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.v1.DocumentMask mask = 5;
+ */
+ com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java
new file mode 100644
index 000000000000..7a9982bc9aed
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java
@@ -0,0 +1,1046 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/query.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * A position in a query result set. + *+ * + * Protobuf type {@code google.firestore.v1.Cursor} + */ +public final class Cursor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.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(); + before_ = false; + } + + @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) == 0x00000001)) { + values_ = new java.util.ArrayList
+ * 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.v1.Value values = 1;
+ */
+ public java.util.List+ * 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.v1.Value values = 1;
+ */
+ public java.util.List extends com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ 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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.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;
+ */
+ 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.v1.Cursor)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.Cursor other = (com.google.firestore.v1.Cursor) obj;
+
+ boolean result = true;
+ result = result && getValuesList().equals(other.getValuesList());
+ result = result && (getBefore() == other.getBefore());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1.Cursor parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.Cursor parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.Cursor parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.Cursor parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.Cursor parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.Cursor parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.Cursor parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.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.v1.Cursor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * 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.v1.Value values = 1;
+ */
+ public java.util.List+ * 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.v1.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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder setValues(int index, com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder setValues(int index, com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder addValues(com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder addValues(int index, com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder addValues(com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder addValues(int index, com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends com.google.firestore.v1.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.v1.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.v1.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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public java.util.List extends com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value.Builder addValuesBuilder() {
+ return getValuesFieldBuilder().addBuilder(com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public com.google.firestore.v1.Value.Builder addValuesBuilder(int index) {
+ return getValuesFieldBuilder()
+ .addBuilder(index, com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ public java.util.List+ * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + *+ * + *
bool before = 2;
+ */
+ 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;
+ */
+ 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;
+ */
+ public Builder clearBefore() {
+
+ before_ = false;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.Cursor)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.Cursor)
+ private static final com.google.firestore.v1.Cursor DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.Cursor();
+ }
+
+ public static com.google.firestore.v1.Cursor getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * 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.v1.Value values = 1;
+ */
+ java.util.List+ * 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.v1.Value values = 1;
+ */
+ com.google.firestore.v1.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.v1.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.v1.Value values = 1;
+ */
+ java.util.List extends com.google.firestore.v1.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.v1.Value values = 1;
+ */
+ com.google.firestore.v1.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;
+ */
+ boolean getBefore();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DatabaseRootName.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DatabaseRootName.java
new file mode 100644
index 000000000000..3acfa897f7ba
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DatabaseRootName.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2018 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
+ *
+ * http://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.v1;
+
+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+ * The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. + *+ * + * Protobuf type {@code google.firestore.v1.DeleteDocumentRequest} + */ +public final class DeleteDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.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 + 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(); + } + 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: + { + com.google.firestore.v1.Precondition.Builder subBuilder = null; + if (currentDocument_ != null) { + subBuilder = currentDocument_.toBuilder(); + } + currentDocument_ = + input.readMessage( + com.google.firestore.v1.Precondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(currentDocument_); + currentDocument_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(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.v1.FirestoreProto + .internal_static_google_firestore_v1_DeleteDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_DeleteDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.DeleteDocumentRequest.class, + com.google.firestore.v1.DeleteDocumentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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 to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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.v1.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.v1.Precondition current_document = 2;
+ */
+ 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.v1.Precondition current_document = 2;
+ */
+ public com.google.firestore.v1.Precondition getCurrentDocument() {
+ return currentDocument_ == null
+ ? com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ public com.google.firestore.v1.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.v1.DeleteDocumentRequest)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.DeleteDocumentRequest other =
+ (com.google.firestore.v1.DeleteDocumentRequest) obj;
+
+ boolean result = true;
+ result = result && getName().equals(other.getName());
+ result = result && (hasCurrentDocument() == other.hasCurrentDocument());
+ if (hasCurrentDocument()) {
+ result = result && getCurrentDocument().equals(other.getCurrentDocument());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1.DeleteDocumentRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DeleteDocumentRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DeleteDocumentRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.DeleteDocumentRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.DeleteDocumentRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DeleteDocumentRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DeleteDocumentRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.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.v1.Firestore.DeleteDocument]. + *+ * + * Protobuf type {@code google.firestore.v1.DeleteDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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 to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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 to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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.v1.Precondition currentDocument_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Precondition,
+ com.google.firestore.v1.Precondition.Builder,
+ com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ 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.v1.Precondition current_document = 2;
+ */
+ public com.google.firestore.v1.Precondition getCurrentDocument() {
+ if (currentDocumentBuilder_ == null) {
+ return currentDocument_ == null
+ ? com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ public Builder setCurrentDocument(com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ public Builder setCurrentDocument(
+ com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ public Builder mergeCurrentDocument(com.google.firestore.v1.Precondition value) {
+ if (currentDocumentBuilder_ == null) {
+ if (currentDocument_ != null) {
+ currentDocument_ =
+ com.google.firestore.v1.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.v1.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.v1.Precondition current_document = 2;
+ */
+ public com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder() {
+ if (currentDocumentBuilder_ != null) {
+ return currentDocumentBuilder_.getMessageOrBuilder();
+ } else {
+ return currentDocument_ == null
+ ? com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Precondition,
+ com.google.firestore.v1.Precondition.Builder,
+ com.google.firestore.v1.PreconditionOrBuilder>
+ getCurrentDocumentFieldBuilder() {
+ if (currentDocumentBuilder_ == null) {
+ currentDocumentBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Precondition,
+ com.google.firestore.v1.Precondition.Builder,
+ com.google.firestore.v1.PreconditionOrBuilder>(
+ getCurrentDocument(), getParentForChildren(), isClean());
+ currentDocument_ = null;
+ }
+ return currentDocumentBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.DeleteDocumentRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.DeleteDocumentRequest)
+ private static final com.google.firestore.v1.DeleteDocumentRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.DeleteDocumentRequest();
+ }
+
+ public static com.google.firestore.v1.DeleteDocumentRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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.v1.Precondition current_document = 2;
+ */
+ 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.v1.Precondition current_document = 2;
+ */
+ com.google.firestore.v1.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.v1.Precondition current_document = 2;
+ */
+ com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java
new file mode 100644
index 000000000000..da198de868b2
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java
@@ -0,0 +1,1722 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/document.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * A Firestore document. + * Must not exceed 1 MiB - 4 bytes. + *+ * + * Protobuf type {@code google.firestore.v1.Document} + */ +public final class Document extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.Document) + DocumentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Document.newBuilder() to construct. + private Document(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Document() { + name_ = ""; + } + + @java.lang.Override + 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_ & 0x00000002) == 0x00000002)) { + fields_ = + com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry
+ * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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;
+ */
+ 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+ * 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.v1.Value> fields = 2;
+ */
+ 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.Deprecated
+ public java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public com.google.firestore.v1.Value getFieldsOrDefault(
+ java.lang.String key, com.google.firestore.v1.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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+ * A Firestore document. + * Must not exceed 1 MiB - 4 bytes. + *+ * + * Protobuf type {@code google.firestore.v1.Document} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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+ * 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.v1.Value> fields = 2;
+ */
+ 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.Deprecated
+ public java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public com.google.firestore.v1.Value getFieldsOrDefault(
+ java.lang.String key, com.google.firestore.v1.Value defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public Builder removeFields(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableFields().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ public Builder putFields(java.lang.String key, com.google.firestore.v1.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.v1.Value> fields = 2;
+ */
+ public Builder putAllFields(
+ java.util.Map+ * 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 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;
+ */
+ 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_ = null;
+ 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;
+ */
+ 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;
+ */
+ 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.setUnknownFieldsProto3(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.v1.Document)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.Document)
+ private static final com.google.firestore.v1.Document DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.Document();
+ }
+
+ public static com.google.firestore.v1.Document getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A [Document][google.firestore.v1.Document] has changed. + * May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that + * ultimately resulted in a new value for the [Document][google.firestore.v1.Document]. + * Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical + * change, if multiple targets are affected. + *+ * + * Protobuf type {@code google.firestore.v1.DocumentChange} + */ +public final class DocumentChange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.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_ = java.util.Collections.emptyList(); + removedTargetIds_ = java.util.Collections.emptyList(); + } + + @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.v1.Document.Builder subBuilder = null; + if (document_ != null) { + subBuilder = document_.toBuilder(); + } + document_ = + input.readMessage(com.google.firestore.v1.Document.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(document_); + document_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + targetIds_ = new java.util.ArrayList
+ * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public boolean hasDocument() {
+ return document_ != null;
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public com.google.firestore.v1.Document getDocument() {
+ return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_;
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() {
+ return getDocument();
+ }
+
+ public static final int TARGET_IDS_FIELD_NUMBER = 5;
+ private java.util.List+ * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public java.util.List+ * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public int getTargetIdsCount() {
+ return targetIds_.size();
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public int getTargetIds(int index) {
+ return targetIds_.get(index);
+ }
+
+ private int targetIdsMemoizedSerializedSize = -1;
+
+ public static final int REMOVED_TARGET_IDS_FIELD_NUMBER = 6;
+ private java.util.List+ * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public java.util.List+ * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ 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;
+ */
+ public int getRemovedTargetIds(int index) {
+ return removedTargetIds_.get(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_.get(i));
+ }
+ if (getRemovedTargetIdsList().size() > 0) {
+ output.writeUInt32NoTag(50);
+ output.writeUInt32NoTag(removedTargetIdsMemoizedSerializedSize);
+ }
+ for (int i = 0; i < removedTargetIds_.size(); i++) {
+ output.writeInt32NoTag(removedTargetIds_.get(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_.get(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_.get(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.v1.DocumentChange)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.DocumentChange other = (com.google.firestore.v1.DocumentChange) obj;
+
+ boolean result = true;
+ result = result && (hasDocument() == other.hasDocument());
+ if (hasDocument()) {
+ result = result && getDocument().equals(other.getDocument());
+ }
+ result = result && getTargetIdsList().equals(other.getTargetIdsList());
+ result = result && getRemovedTargetIdsList().equals(other.getRemovedTargetIdsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1.DocumentChange parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentChange parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentChange parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.DocumentChange parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.DocumentChange parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentChange parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentChange parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.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.v1.Document] has changed. + * May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that + * ultimately resulted in a new value for the [Document][google.firestore.v1.Document]. + * Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical + * change, if multiple targets are affected. + *+ * + * Protobuf type {@code google.firestore.v1.DocumentChange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public boolean hasDocument() {
+ return documentBuilder_ != null || document_ != null;
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public com.google.firestore.v1.Document getDocument() {
+ if (documentBuilder_ == null) {
+ return document_ == null
+ ? com.google.firestore.v1.Document.getDefaultInstance()
+ : document_;
+ } else {
+ return documentBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public Builder setDocument(com.google.firestore.v1.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.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public Builder setDocument(com.google.firestore.v1.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.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public Builder mergeDocument(com.google.firestore.v1.Document value) {
+ if (documentBuilder_ == null) {
+ if (document_ != null) {
+ document_ =
+ com.google.firestore.v1.Document.newBuilder(document_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ document_ = value;
+ }
+ onChanged();
+ } else {
+ documentBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.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.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public com.google.firestore.v1.Document.Builder getDocumentBuilder() {
+
+ onChanged();
+ return getDocumentFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() {
+ if (documentBuilder_ != null) {
+ return documentBuilder_.getMessageOrBuilder();
+ } else {
+ return document_ == null
+ ? com.google.firestore.v1.Document.getDefaultInstance()
+ : document_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>
+ getDocumentFieldBuilder() {
+ if (documentBuilder_ == null) {
+ documentBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.firestore.v1.Document,
+ com.google.firestore.v1.Document.Builder,
+ com.google.firestore.v1.DocumentOrBuilder>(
+ getDocument(), getParentForChildren(), isClean());
+ document_ = null;
+ }
+ return documentBuilder_;
+ }
+
+ private java.util.List+ * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public java.util.List+ * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public int getTargetIdsCount() {
+ return targetIds_.size();
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public int getTargetIds(int index) {
+ return targetIds_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public Builder setTargetIds(int index, int value) {
+ ensureTargetIdsIsMutable();
+ targetIds_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ public Builder addTargetIds(int value) {
+ ensureTargetIdsIsMutable();
+ targetIds_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ 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;
+ */
+ public Builder clearTargetIds() {
+ targetIds_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public java.util.List+ * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ 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;
+ */
+ public int getRemovedTargetIds(int index) {
+ return removedTargetIds_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public Builder setRemovedTargetIds(int index, int value) {
+ ensureRemovedTargetIdsIsMutable();
+ removedTargetIds_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public Builder addRemovedTargetIds(int value) {
+ ensureRemovedTargetIdsIsMutable();
+ removedTargetIds_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ 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;
+ */
+ public Builder clearRemovedTargetIds() {
+ removedTargetIds_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1.DocumentChange)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentChange)
+ private static final com.google.firestore.v1.DocumentChange DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.DocumentChange();
+ }
+
+ public static com.google.firestore.v1.DocumentChange getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ boolean hasDocument();
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ com.google.firestore.v1.Document getDocument();
+ /**
+ *
+ *
+ * + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + *+ * + *
.google.firestore.v1.Document document = 1;
+ */
+ com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder();
+
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ java.util.List+ * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ int getTargetIdsCount();
+ /**
+ *
+ *
+ * + * A set of target IDs of targets that match this document. + *+ * + *
repeated int32 target_ids = 5;
+ */
+ int getTargetIds(int index);
+
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ java.util.List+ * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ int getRemovedTargetIdsCount();
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that no longer match this document. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ int getRemovedTargetIds(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java
new file mode 100644
index 000000000000..c0a83d86a3ae
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java
@@ -0,0 +1,1096 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/write.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * A [Document][google.firestore.v1.Document] has been deleted. + * May be the result of multiple [writes][google.firestore.v1.Write], including updates, the + * last of which deleted the [Document][google.firestore.v1.Document]. + * Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical + * delete, if multiple targets are affected. + *+ * + * Protobuf type {@code google.firestore.v1.DocumentDelete} + */ +public final class DocumentDelete extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.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_ = java.util.Collections.emptyList(); + } + + @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_ & 0x00000002) == 0x00000002)) { + removedTargetIds_ = new java.util.ArrayList
+ * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ 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.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ 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 java.util.List+ * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public java.util.List+ * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public int getRemovedTargetIdsCount() {
+ return removedTargetIds_.size();
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public int getRemovedTargetIds(int index) {
+ return removedTargetIds_.get(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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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_.get(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_.get(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.v1.DocumentDelete)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.DocumentDelete other = (com.google.firestore.v1.DocumentDelete) obj;
+
+ boolean result = true;
+ result = result && getDocument().equals(other.getDocument());
+ result = result && getRemovedTargetIdsList().equals(other.getRemovedTargetIdsList());
+ result = result && (hasReadTime() == other.hasReadTime());
+ if (hasReadTime()) {
+ result = result && getReadTime().equals(other.getReadTime());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1.DocumentDelete parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentDelete parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentDelete parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.DocumentDelete parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.DocumentDelete parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentDelete parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentDelete parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.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.v1.Document] has been deleted. + * May be the result of multiple [writes][google.firestore.v1.Write], including updates, the + * last of which deleted the [Document][google.firestore.v1.Document]. + * Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical + * delete, if multiple targets are affected. + *+ * + * Protobuf type {@code google.firestore.v1.DocumentDelete} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ 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.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ 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.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ 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.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ public Builder clearDocument() {
+
+ document_ = getDefaultInstance().getDocument();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ public Builder setDocumentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ document_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public java.util.List+ * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public int getRemovedTargetIdsCount() {
+ return removedTargetIds_.size();
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public int getRemovedTargetIds(int index) {
+ return removedTargetIds_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public Builder setRemovedTargetIds(int index, int value) {
+ ensureRemovedTargetIdsIsMutable();
+ removedTargetIds_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ public Builder addRemovedTargetIds(int value) {
+ ensureRemovedTargetIdsIsMutable();
+ removedTargetIds_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ 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;
+ */
+ public Builder clearRemovedTargetIds() {
+ removedTargetIds_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp readTime_ = null;
+ 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;
+ */
+ 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;
+ */
+ 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.setUnknownFieldsProto3(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.v1.DocumentDelete)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentDelete)
+ private static final com.google.firestore.v1.DocumentDelete DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.DocumentDelete();
+ }
+
+ public static com.google.firestore.v1.DocumentDelete getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ java.lang.String getDocument();
+ /**
+ *
+ *
+ * + * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + *+ * + *
string document = 1;
+ */
+ com.google.protobuf.ByteString getDocumentBytes();
+
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ java.util.List+ * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ int getRemovedTargetIdsCount();
+ /**
+ *
+ *
+ * + * A set of target IDs for targets that previously matched this entity. + *+ * + *
repeated int32 removed_target_ids = 6;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java
new file mode 100644
index 000000000000..eac18de912d5
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMask.java
@@ -0,0 +1,698 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/common.proto
+
+package com.google.firestore.v1;
+
+/**
+ *
+ *
+ * + * 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.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. + *+ * + * Protobuf type {@code google.firestore.v1.DocumentMask} + */ +public final class DocumentMask extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.DocumentMask) + DocumentMaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentMask.newBuilder() to construct. + private DocumentMask(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DocumentMask() { + fieldPaths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + 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) == 0x00000001)) { + fieldPaths_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldPaths_.add(s); + break; + } + default: + { + if (!parseUnknownFieldProto3(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) == 0x00000001)) { + fieldPaths_ = fieldPaths_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.CommonProto + .internal_static_google_firestore_v1_DocumentMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.CommonProto + .internal_static_google_firestore_v1_DocumentMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.DocumentMask.class, + com.google.firestore.v1.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.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getFieldPathsList() {
+ return fieldPaths_;
+ }
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public int getFieldPathsCount() {
+ return fieldPaths_.size();
+ }
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public java.lang.String getFieldPaths(int index) {
+ return fieldPaths_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ 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.v1.DocumentMask)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.v1.DocumentMask other = (com.google.firestore.v1.DocumentMask) obj;
+
+ boolean result = true;
+ result = result && getFieldPathsList().equals(other.getFieldPathsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1.DocumentMask parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentMask parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentMask parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.v1.DocumentMask parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.v1.DocumentMask parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentMask parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.DocumentMask parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.v1.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.v1.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.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. + *+ * + * Protobuf type {@code google.firestore.v1.DocumentMask} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getFieldPathsList() {
+ return fieldPaths_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public int getFieldPathsCount() {
+ return fieldPaths_.size();
+ }
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public java.lang.String getFieldPaths(int index) {
+ return fieldPaths_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ 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.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ 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.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ 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.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ public Builder addAllFieldPaths(java.lang.Iterable+ * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ 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.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ 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.setUnknownFieldsProto3(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.v1.DocumentMask)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentMask)
+ private static final com.google.firestore.v1.DocumentMask DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.v1.DocumentMask();
+ }
+
+ public static com.google.firestore.v1.DocumentMask getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ java.util.List+ * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ int getFieldPathsCount();
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ java.lang.String getFieldPaths(int index);
+ /**
+ *
+ *
+ * + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + *+ * + *
repeated string field_paths = 1;
+ */
+ com.google.protobuf.ByteString getFieldPathsBytes(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java
new file mode 100644
index 000000000000..831405256159
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentOrBuilder.java
@@ -0,0 +1,258 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1/document.proto
+
+package com.google.firestore.v1;
+
+public interface DocumentOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.firestore.v1.Document)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + *+ * + *
string name = 1;
+ */
+ 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.v1.Value> fields = 2;
+ */
+ int getFieldsCount();
+ /**
+ *
+ *
+ * + * The document's fields. + * The map keys represent field names. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The map + * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by the simple + * or quoted field names of the containing fields, delimited by `.`. For + * example, the structured field + * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + * represented by the field path `foo.x&y`. + * Within a field path, a quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + *+ * + *
map<string, .google.firestore.v1.Value> fields = 2;
+ */
+ boolean containsFields(java.lang.String key);
+ /** Use {@link #getFieldsMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ java.util.Map+ * 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.v1.Value> fields = 2;
+ */
+ com.google.firestore.v1.Value getFieldsOrDefault(
+ java.lang.String key, com.google.firestore.v1.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.v1.Value> fields = 2;
+ */
+ com.google.firestore.v1.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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentPathName.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentPathName.java
new file mode 100644
index 000000000000..ce5f8a5fce51
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentPathName.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright 2018 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
+ *
+ * http://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.v1;
+
+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