From 334bf49f103338989930a2a2def961c9b9f665c1 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Thu, 21 Mar 2019 14:49:03 -0700 Subject: [PATCH] Run synthtool --- .../admin/v1/FirestoreAdminGrpc.java | 1434 +++++++ .../admin/v1/CreateIndexRequest.java | 865 ++++ .../admin/v1/CreateIndexRequestOrBuilder.java | 64 + .../firestore/admin/v1/DatabaseName.java | 180 + .../admin/v1/DeleteIndexRequest.java | 605 +++ .../admin/v1/DeleteIndexRequestOrBuilder.java | 33 + .../admin/v1/ExportDocumentsMetadata.java | 2040 +++++++++ .../v1/ExportDocumentsMetadataOrBuilder.java | 220 + .../admin/v1/ExportDocumentsRequest.java | 1063 +++++ .../v1/ExportDocumentsRequestOrBuilder.java | 109 + .../admin/v1/ExportDocumentsResponse.java | 614 +++ .../v1/ExportDocumentsResponseOrBuilder.java | 35 + .../com/google/firestore/admin/v1/Field.java | 2470 +++++++++++ .../google/firestore/admin/v1/FieldName.java | 248 ++ .../admin/v1/FieldOperationMetadata.java | 3483 ++++++++++++++++ .../v1/FieldOperationMetadataOrBuilder.java | 252 ++ .../firestore/admin/v1/FieldOrBuilder.java | 113 + .../google/firestore/admin/v1/FieldProto.java | 84 + .../admin/v1/FirestoreAdminProto.java | 263 ++ .../firestore/admin/v1/GetFieldRequest.java | 604 +++ .../admin/v1/GetFieldRequestOrBuilder.java | 33 + .../firestore/admin/v1/GetIndexRequest.java | 604 +++ .../admin/v1/GetIndexRequestOrBuilder.java | 33 + .../admin/v1/ImportDocumentsMetadata.java | 2040 +++++++++ .../v1/ImportDocumentsMetadataOrBuilder.java | 220 + .../admin/v1/ImportDocumentsRequest.java | 1055 +++++ .../v1/ImportDocumentsRequestOrBuilder.java | 107 + .../com/google/firestore/admin/v1/Index.java | 3277 +++++++++++++++ .../google/firestore/admin/v1/IndexName.java | 248 ++ .../admin/v1/IndexOperationMetadata.java | 1799 ++++++++ .../v1/IndexOperationMetadataOrBuilder.java | 181 + .../firestore/admin/v1/IndexOrBuilder.java | 185 + .../google/firestore/admin/v1/IndexProto.java | 91 + .../firestore/admin/v1/ListFieldsRequest.java | 1049 +++++ .../admin/v1/ListFieldsRequestOrBuilder.java | 98 + .../admin/v1/ListFieldsResponse.java | 1096 +++++ .../admin/v1/ListFieldsResponseOrBuilder.java | 84 + .../admin/v1/ListIndexesRequest.java | 1021 +++++ .../admin/v1/ListIndexesRequestOrBuilder.java | 90 + .../admin/v1/ListIndexesResponse.java | 1097 +++++ .../v1/ListIndexesResponseOrBuilder.java | 84 + .../firestore/admin/v1/LocationMetadata.java | 434 ++ .../admin/v1/LocationMetadataOrBuilder.java | 9 + .../firestore/admin/v1/LocationProto.java | 64 + .../firestore/admin/v1/OperationProto.java | 210 + .../firestore/admin/v1/OperationState.java | 263 ++ .../google/firestore/admin/v1/ParentName.java | 213 + .../google/firestore/admin/v1/Progress.java | 599 +++ .../firestore/admin/v1/ProgressOrBuilder.java | 32 + .../admin/v1/UpdateFieldRequest.java | 969 +++++ .../admin/v1/UpdateFieldRequestOrBuilder.java | 75 + .../google/firestore/admin/v1/field.proto | 96 + .../firestore/admin/v1/firestore_admin.proto | 274 ++ .../google/firestore/admin/v1/index.proto | 149 + .../google/firestore/admin/v1/location.proto | 35 + .../google/firestore/admin/v1/operation.proto | 204 + .../v1/BatchGetDocumentsRequest.java | 6 +- .../v1/BatchGetDocumentsResponse.java | 18 +- .../BatchGetDocumentsResponseOrBuilder.java | 3 +- .../firestore/v1/BeginTransactionRequest.java | 6 +- .../v1/BeginTransactionResponse.java | 6 +- .../com/google/firestore/v1/CommonProto.java | 8 +- .../firestore/v1/CreateDocumentRequest.java | 6 +- .../firestore/v1/DeleteDocumentRequest.java | 6 +- .../google/firestore/v1/DocumentChange.java | 18 +- .../google/firestore/v1/DocumentDelete.java | 39 +- .../firestore/v1/DocumentDeleteOrBuilder.java | 6 +- .../com/google/firestore/v1/DocumentMask.java | 71 +- .../firestore/v1/DocumentMaskOrBuilder.java | 20 +- .../google/firestore/v1/DocumentProto.java | 12 +- .../google/firestore/v1/DocumentRemove.java | 37 +- .../firestore/v1/DocumentRemoveOrBuilder.java | 6 +- .../firestore/v1/DocumentTransform.java | 45 +- .../google/firestore/v1/ExistenceFilter.java | 12 +- .../v1/ExistenceFilterOrBuilder.java | 3 +- .../firestore/v1/GetDocumentRequest.java | 6 +- .../v1/ListCollectionIdsRequest.java | 6 +- .../v1/ListCollectionIdsResponse.java | 6 +- .../firestore/v1/ListDocumentsRequest.java | 26 +- .../v1/ListDocumentsRequestOrBuilder.java | 5 +- .../firestore/v1/ListDocumentsResponse.java | 6 +- .../google/firestore/v1/ListenResponse.java | 48 +- .../firestore/v1/ListenResponseOrBuilder.java | 12 +- .../com/google/firestore/v1/QueryProto.java | 46 +- .../google/firestore/v1/RunQueryResponse.java | 26 +- .../v1/RunQueryResponseOrBuilder.java | 5 +- .../google/firestore/v1/StructuredQuery.java | 1290 +++--- .../java/com/google/firestore/v1/Target.java | 12 +- .../google/firestore/v1/TargetOrBuilder.java | 3 +- .../firestore/v1/UpdateDocumentRequest.java | 6 +- .../java/com/google/firestore/v1/Write.java | 24 +- .../google/firestore/v1/WriteOrBuilder.java | 6 +- .../com/google/firestore/v1/WriteProto.java | 12 +- .../com/google/firestore/v1/WriteRequest.java | 24 +- .../firestore/v1/WriteRequestOrBuilder.java | 6 +- .../com/google/firestore/v1/WriteResult.java | 115 +- .../firestore/v1/WriteResultOrBuilder.java | 25 +- .../proto/google/firestore/v1/common.proto | 13 +- .../proto/google/firestore/v1/document.proto | 5 +- .../proto/google/firestore/v1/firestore.proto | 77 +- .../proto/google/firestore/v1/query.proto | 15 +- .../proto/google/firestore/v1/write.proto | 52 +- .../v1beta1/BatchGetDocumentsRequest.java | 6 +- .../v1beta1/BatchGetDocumentsResponse.java | 18 +- .../BatchGetDocumentsResponseOrBuilder.java | 3 +- .../v1beta1/BeginTransactionRequest.java | 6 +- .../v1beta1/BeginTransactionResponse.java | 6 +- .../firestore/v1beta1/CommitRequest.java | 6 +- .../firestore/v1beta1/CommitResponse.java | 6 +- .../google/firestore/v1beta1/CommonProto.java | 10 +- .../v1beta1/CreateDocumentRequest.java | 6 +- .../v1beta1/DeleteDocumentRequest.java | 6 +- .../firestore/v1beta1/DocumentChange.java | 20 +- .../firestore/v1beta1/DocumentDelete.java | 41 +- .../v1beta1/DocumentDeleteOrBuilder.java | 6 +- .../firestore/v1beta1/DocumentMask.java | 45 +- .../v1beta1/DocumentMaskOrBuilder.java | 12 +- .../firestore/v1beta1/DocumentProto.java | 12 +- .../firestore/v1beta1/DocumentRemove.java | 37 +- .../v1beta1/DocumentRemoveOrBuilder.java | 6 +- .../firestore/v1beta1/DocumentTransform.java | 45 +- .../firestore/v1beta1/ExistenceFilter.java | 12 +- .../v1beta1/ExistenceFilterOrBuilder.java | 3 +- .../firestore/v1beta1/GetDocumentRequest.java | 6 +- .../v1beta1/ListCollectionIdsRequest.java | 6 +- .../v1beta1/ListCollectionIdsResponse.java | 6 +- .../v1beta1/ListDocumentsRequest.java | 26 +- .../ListDocumentsRequestOrBuilder.java | 5 +- .../v1beta1/ListDocumentsResponse.java | 6 +- .../firestore/v1beta1/ListenResponse.java | 54 +- .../v1beta1/ListenResponseOrBuilder.java | 12 +- .../google/firestore/v1beta1/QueryProto.java | 68 +- .../firestore/v1beta1/RollbackRequest.java | 6 +- .../firestore/v1beta1/RunQueryRequest.java | 6 +- .../firestore/v1beta1/RunQueryResponse.java | 26 +- .../v1beta1/RunQueryResponseOrBuilder.java | 5 +- .../firestore/v1beta1/StructuredQuery.java | 3684 ++++++++--------- .../com/google/firestore/v1beta1/Target.java | 16 +- .../firestore/v1beta1/TargetOrBuilder.java | 4 +- .../v1beta1/UpdateDocumentRequest.java | 6 +- .../com/google/firestore/v1beta1/Write.java | 24 +- .../firestore/v1beta1/WriteOrBuilder.java | 6 +- .../google/firestore/v1beta1/WriteProto.java | 14 +- .../firestore/v1beta1/WriteRequest.java | 24 +- .../v1beta1/WriteRequestOrBuilder.java | 6 +- .../google/firestore/v1beta1/WriteResult.java | 115 +- .../v1beta1/WriteResultOrBuilder.java | 25 +- .../google/firestore/v1beta1/common.proto | 11 +- .../google/firestore/v1beta1/document.proto | 5 +- .../google/firestore/v1beta1/firestore.proto | 93 +- .../google/firestore/v1beta1/query.proto | 33 +- .../google/firestore/v1beta1/write.proto | 54 +- .../firestore/v1/FirestoreAdminClient.java | 1272 ++++++ .../firestore/v1/FirestoreAdminSettings.java | 278 ++ .../cloud/firestore/v1/FirestoreClient.java | 7 +- .../firestore/v1/stub/FirestoreAdminStub.java | 97 + .../v1/stub/FirestoreAdminStubSettings.java | 595 +++ .../GrpcFirestoreAdminCallableFactory.java | 115 + .../v1/stub/GrpcFirestoreAdminStub.java | 333 ++ .../firestore/v1beta1/FirestoreClient.java | 7 +- .../v1/FirestoreAdminClientTest.java | 485 +++ .../firestore/v1/MockFirestoreAdmin.java | 57 + .../firestore/v1/MockFirestoreAdminImpl.java | 203 + .../google-cloud-firestore/synth.metadata | 20 +- 164 files changed, 39617 insertions(+), 3618 deletions(-) create mode 100644 google-api-grpc/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ParentName.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto create mode 100644 google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java create mode 100644 google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java diff --git a/google-api-grpc/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java b/google-api-grpc/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java new file mode 100644 index 000000000000..00fe8b48559d --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java @@ -0,0 +1,1434 @@ +package com.google.firestore.admin.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Operations are created by service `FirestoreAdmin`, but are accessed via
+ * service `google.longrunning.Operations`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/firestore/admin/v1/firestore_admin.proto") +public final class FirestoreAdminGrpc { + + private FirestoreAdminGrpc() {} + + public static final String SERVICE_NAME = "google.firestore.admin.v1.FirestoreAdmin"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateIndexMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateIndexRequest, com.google.longrunning.Operation> + METHOD_CREATE_INDEX = getCreateIndexMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethod() { + return getCreateIndexMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethod; + if ((getCreateIndexMethod = FirestoreAdminGrpc.getCreateIndexMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getCreateIndexMethod = FirestoreAdminGrpc.getCreateIndexMethod) == null) { + FirestoreAdminGrpc.getCreateIndexMethod = + getCreateIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "CreateIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.CreateIndexRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("CreateIndex")) + .build(); + } + } + } + return getCreateIndexMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListIndexesMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListIndexesRequest, + com.google.firestore.admin.v1.ListIndexesResponse> + METHOD_LIST_INDEXES = getListIndexesMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListIndexesRequest, + com.google.firestore.admin.v1.ListIndexesResponse> + getListIndexesMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListIndexesRequest, + com.google.firestore.admin.v1.ListIndexesResponse> + getListIndexesMethod() { + return getListIndexesMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListIndexesRequest, + com.google.firestore.admin.v1.ListIndexesResponse> + getListIndexesMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListIndexesRequest, + com.google.firestore.admin.v1.ListIndexesResponse> + getListIndexesMethod; + if ((getListIndexesMethod = FirestoreAdminGrpc.getListIndexesMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getListIndexesMethod = FirestoreAdminGrpc.getListIndexesMethod) == null) { + FirestoreAdminGrpc.getListIndexesMethod = + getListIndexesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "ListIndexes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ListIndexesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ListIndexesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("ListIndexes")) + .build(); + } + } + } + return getListIndexesMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetIndexMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetIndexRequest, com.google.firestore.admin.v1.Index> + METHOD_GET_INDEX = getGetIndexMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetIndexRequest, com.google.firestore.admin.v1.Index> + getGetIndexMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetIndexRequest, com.google.firestore.admin.v1.Index> + getGetIndexMethod() { + return getGetIndexMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetIndexRequest, com.google.firestore.admin.v1.Index> + getGetIndexMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetIndexRequest, com.google.firestore.admin.v1.Index> + getGetIndexMethod; + if ((getGetIndexMethod = FirestoreAdminGrpc.getGetIndexMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getGetIndexMethod = FirestoreAdminGrpc.getGetIndexMethod) == null) { + FirestoreAdminGrpc.getGetIndexMethod = + getGetIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "GetIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.GetIndexRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.Index.getDefaultInstance())) + .setSchemaDescriptor(new FirestoreAdminMethodDescriptorSupplier("GetIndex")) + .build(); + } + } + } + return getGetIndexMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteIndexMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteIndexRequest, com.google.protobuf.Empty> + METHOD_DELETE_INDEX = getDeleteIndexMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteIndexRequest, com.google.protobuf.Empty> + getDeleteIndexMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteIndexRequest, com.google.protobuf.Empty> + getDeleteIndexMethod() { + return getDeleteIndexMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteIndexRequest, com.google.protobuf.Empty> + getDeleteIndexMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.DeleteIndexRequest, com.google.protobuf.Empty> + getDeleteIndexMethod; + if ((getDeleteIndexMethod = FirestoreAdminGrpc.getDeleteIndexMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getDeleteIndexMethod = FirestoreAdminGrpc.getDeleteIndexMethod) == null) { + FirestoreAdminGrpc.getDeleteIndexMethod = + getDeleteIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "DeleteIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.DeleteIndexRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("DeleteIndex")) + .build(); + } + } + } + return getDeleteIndexMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetFieldMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetFieldRequest, com.google.firestore.admin.v1.Field> + METHOD_GET_FIELD = getGetFieldMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetFieldRequest, com.google.firestore.admin.v1.Field> + getGetFieldMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetFieldRequest, com.google.firestore.admin.v1.Field> + getGetFieldMethod() { + return getGetFieldMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetFieldRequest, com.google.firestore.admin.v1.Field> + getGetFieldMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.GetFieldRequest, com.google.firestore.admin.v1.Field> + getGetFieldMethod; + if ((getGetFieldMethod = FirestoreAdminGrpc.getGetFieldMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getGetFieldMethod = FirestoreAdminGrpc.getGetFieldMethod) == null) { + FirestoreAdminGrpc.getGetFieldMethod = + getGetFieldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "GetField")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.GetFieldRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.Field.getDefaultInstance())) + .setSchemaDescriptor(new FirestoreAdminMethodDescriptorSupplier("GetField")) + .build(); + } + } + } + return getGetFieldMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getUpdateFieldMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.UpdateFieldRequest, com.google.longrunning.Operation> + METHOD_UPDATE_FIELD = getUpdateFieldMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.UpdateFieldRequest, com.google.longrunning.Operation> + getUpdateFieldMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.UpdateFieldRequest, com.google.longrunning.Operation> + getUpdateFieldMethod() { + return getUpdateFieldMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.UpdateFieldRequest, com.google.longrunning.Operation> + getUpdateFieldMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.UpdateFieldRequest, com.google.longrunning.Operation> + getUpdateFieldMethod; + if ((getUpdateFieldMethod = FirestoreAdminGrpc.getUpdateFieldMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getUpdateFieldMethod = FirestoreAdminGrpc.getUpdateFieldMethod) == null) { + FirestoreAdminGrpc.getUpdateFieldMethod = + getUpdateFieldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "UpdateField")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.UpdateFieldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("UpdateField")) + .build(); + } + } + } + return getUpdateFieldMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListFieldsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListFieldsRequest, + com.google.firestore.admin.v1.ListFieldsResponse> + METHOD_LIST_FIELDS = getListFieldsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListFieldsRequest, + com.google.firestore.admin.v1.ListFieldsResponse> + getListFieldsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListFieldsRequest, + com.google.firestore.admin.v1.ListFieldsResponse> + getListFieldsMethod() { + return getListFieldsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListFieldsRequest, + com.google.firestore.admin.v1.ListFieldsResponse> + getListFieldsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ListFieldsRequest, + com.google.firestore.admin.v1.ListFieldsResponse> + getListFieldsMethod; + if ((getListFieldsMethod = FirestoreAdminGrpc.getListFieldsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getListFieldsMethod = FirestoreAdminGrpc.getListFieldsMethod) == null) { + FirestoreAdminGrpc.getListFieldsMethod = + getListFieldsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "ListFields")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ListFieldsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ListFieldsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new FirestoreAdminMethodDescriptorSupplier("ListFields")) + .build(); + } + } + } + return getListFieldsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getExportDocumentsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ExportDocumentsRequest, com.google.longrunning.Operation> + METHOD_EXPORT_DOCUMENTS = getExportDocumentsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ExportDocumentsRequest, com.google.longrunning.Operation> + getExportDocumentsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ExportDocumentsRequest, com.google.longrunning.Operation> + getExportDocumentsMethod() { + return getExportDocumentsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ExportDocumentsRequest, com.google.longrunning.Operation> + getExportDocumentsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ExportDocumentsRequest, com.google.longrunning.Operation> + getExportDocumentsMethod; + if ((getExportDocumentsMethod = FirestoreAdminGrpc.getExportDocumentsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getExportDocumentsMethod = FirestoreAdminGrpc.getExportDocumentsMethod) == null) { + FirestoreAdminGrpc.getExportDocumentsMethod = + getExportDocumentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "ExportDocuments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ExportDocumentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("ExportDocuments")) + .build(); + } + } + } + return getExportDocumentsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getImportDocumentsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ImportDocumentsRequest, com.google.longrunning.Operation> + METHOD_IMPORT_DOCUMENTS = getImportDocumentsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ImportDocumentsRequest, com.google.longrunning.Operation> + getImportDocumentsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ImportDocumentsRequest, com.google.longrunning.Operation> + getImportDocumentsMethod() { + return getImportDocumentsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ImportDocumentsRequest, com.google.longrunning.Operation> + getImportDocumentsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.ImportDocumentsRequest, com.google.longrunning.Operation> + getImportDocumentsMethod; + if ((getImportDocumentsMethod = FirestoreAdminGrpc.getImportDocumentsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getImportDocumentsMethod = FirestoreAdminGrpc.getImportDocumentsMethod) == null) { + FirestoreAdminGrpc.getImportDocumentsMethod = + getImportDocumentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.firestore.admin.v1.FirestoreAdmin", "ImportDocuments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.ImportDocumentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("ImportDocuments")) + .build(); + } + } + } + return getImportDocumentsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static FirestoreAdminStub newStub(io.grpc.Channel channel) { + return new FirestoreAdminStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static FirestoreAdminBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new FirestoreAdminBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static FirestoreAdminFutureStub newFutureStub(io.grpc.Channel channel) { + return new FirestoreAdminFutureStub(channel); + } + + /** + * + * + *
+   * Operations are created by service `FirestoreAdmin`, but are accessed via
+   * service `google.longrunning.Operations`.
+   * 
+ */ + public abstract static class FirestoreAdminImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
+     * which may be used to track the status of the creation. The metadata for
+     * the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
+     * 
+ */ + public void createIndex( + com.google.firestore.admin.v1.CreateIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateIndexMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists composite indexes.
+     * 
+ */ + public void listIndexes( + com.google.firestore.admin.v1.ListIndexesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListIndexesMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets a composite index.
+     * 
+ */ + public void getIndex( + com.google.firestore.admin.v1.GetIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetIndexMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes a composite index.
+     * 
+ */ + public void deleteIndex( + com.google.firestore.admin.v1.DeleteIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteIndexMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets the metadata and configuration for a Field.
+     * 
+ */ + public void getField( + com.google.firestore.admin.v1.GetFieldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetFieldMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Updates a field configuration. Currently, field updates apply only to
+     * single field index configuration. However, calls to
+     * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid
+     * changing any configuration that the caller isn't aware of. The field mask
+     * should be specified as: `{ paths: "index_config" }`.
+     * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to
+     * track the status of the field update. The metadata for
+     * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
+     * To configure the default field settings for the database, use
+     * the special `Field` with resource name:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+     * 
+ */ + public void updateField( + com.google.firestore.admin.v1.UpdateFieldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateFieldMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists the field configuration and metadata for this database.
+     * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ */ + public void listFields( + com.google.firestore.admin.v1.ListFieldsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListFieldsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Exports a copy of all or a subset of documents from Google Cloud Firestore
+     * to another storage system, such as Google Cloud Storage. Recent updates to
+     * documents may not be reflected in the export. The export occurs in the
+     * background and its progress can be monitored and managed via the
+     * Operation resource that is created. The output of an export may only be
+     * used once the associated operation is done. If an export operation is
+     * cancelled before completion it may leave partial data behind in Google
+     * Cloud Storage.
+     * 
+ */ + public void exportDocuments( + com.google.firestore.admin.v1.ExportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportDocumentsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Imports documents into Google Cloud Firestore. Existing documents with the
+     * same name are overwritten. The import occurs in the background and its
+     * progress can be monitored and managed via the Operation resource that is
+     * created. If an ImportDocuments operation is cancelled, it is possible
+     * that a subset of the data has already been imported to Cloud Firestore.
+     * 
+ */ + public void importDocuments( + com.google.firestore.admin.v1.ImportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getImportDocumentsMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateIndexMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.CreateIndexRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_INDEX))) + .addMethod( + getListIndexesMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.ListIndexesRequest, + com.google.firestore.admin.v1.ListIndexesResponse>( + this, METHODID_LIST_INDEXES))) + .addMethod( + getGetIndexMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.GetIndexRequest, + com.google.firestore.admin.v1.Index>(this, METHODID_GET_INDEX))) + .addMethod( + getDeleteIndexMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.DeleteIndexRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_INDEX))) + .addMethod( + getGetFieldMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.GetFieldRequest, + com.google.firestore.admin.v1.Field>(this, METHODID_GET_FIELD))) + .addMethod( + getUpdateFieldMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.UpdateFieldRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_FIELD))) + .addMethod( + getListFieldsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.ListFieldsRequest, + com.google.firestore.admin.v1.ListFieldsResponse>( + this, METHODID_LIST_FIELDS))) + .addMethod( + getExportDocumentsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.ExportDocumentsRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_DOCUMENTS))) + .addMethod( + getImportDocumentsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.ImportDocumentsRequest, + com.google.longrunning.Operation>(this, METHODID_IMPORT_DOCUMENTS))) + .build(); + } + } + + /** + * + * + *
+   * Operations are created by service `FirestoreAdmin`, but are accessed via
+   * service `google.longrunning.Operations`.
+   * 
+ */ + public static final class FirestoreAdminStub + extends io.grpc.stub.AbstractStub { + private FirestoreAdminStub(io.grpc.Channel channel) { + super(channel); + } + + private FirestoreAdminStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirestoreAdminStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreAdminStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
+     * which may be used to track the status of the creation. The metadata for
+     * the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
+     * 
+ */ + public void createIndex( + com.google.firestore.admin.v1.CreateIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateIndexMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists composite indexes.
+     * 
+ */ + public void listIndexes( + com.google.firestore.admin.v1.ListIndexesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListIndexesMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a composite index.
+     * 
+ */ + public void getIndex( + com.google.firestore.admin.v1.GetIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetIndexMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a composite index.
+     * 
+ */ + public void deleteIndex( + com.google.firestore.admin.v1.DeleteIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteIndexMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the metadata and configuration for a Field.
+     * 
+ */ + public void getField( + com.google.firestore.admin.v1.GetFieldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetFieldMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a field configuration. Currently, field updates apply only to
+     * single field index configuration. However, calls to
+     * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid
+     * changing any configuration that the caller isn't aware of. The field mask
+     * should be specified as: `{ paths: "index_config" }`.
+     * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to
+     * track the status of the field update. The metadata for
+     * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
+     * To configure the default field settings for the database, use
+     * the special `Field` with resource name:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+     * 
+ */ + public void updateField( + com.google.firestore.admin.v1.UpdateFieldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateFieldMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the field configuration and metadata for this database.
+     * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ */ + public void listFields( + com.google.firestore.admin.v1.ListFieldsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListFieldsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports a copy of all or a subset of documents from Google Cloud Firestore
+     * to another storage system, such as Google Cloud Storage. Recent updates to
+     * documents may not be reflected in the export. The export occurs in the
+     * background and its progress can be monitored and managed via the
+     * Operation resource that is created. The output of an export may only be
+     * used once the associated operation is done. If an export operation is
+     * cancelled before completion it may leave partial data behind in Google
+     * Cloud Storage.
+     * 
+ */ + public void exportDocuments( + com.google.firestore.admin.v1.ExportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportDocumentsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports documents into Google Cloud Firestore. Existing documents with the
+     * same name are overwritten. The import occurs in the background and its
+     * progress can be monitored and managed via the Operation resource that is
+     * created. If an ImportDocuments operation is cancelled, it is possible
+     * that a subset of the data has already been imported to Cloud Firestore.
+     * 
+ */ + public void importDocuments( + com.google.firestore.admin.v1.ImportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getImportDocumentsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Operations are created by service `FirestoreAdmin`, but are accessed via
+   * service `google.longrunning.Operations`.
+   * 
+ */ + public static final class FirestoreAdminBlockingStub + extends io.grpc.stub.AbstractStub { + private FirestoreAdminBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private FirestoreAdminBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirestoreAdminBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreAdminBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
+     * which may be used to track the status of the creation. The metadata for
+     * the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation createIndex( + com.google.firestore.admin.v1.CreateIndexRequest request) { + return blockingUnaryCall( + getChannel(), getCreateIndexMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists composite indexes.
+     * 
+ */ + public com.google.firestore.admin.v1.ListIndexesResponse listIndexes( + com.google.firestore.admin.v1.ListIndexesRequest request) { + return blockingUnaryCall( + getChannel(), getListIndexesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a composite index.
+     * 
+ */ + public com.google.firestore.admin.v1.Index getIndex( + com.google.firestore.admin.v1.GetIndexRequest request) { + return blockingUnaryCall(getChannel(), getGetIndexMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a composite index.
+     * 
+ */ + public com.google.protobuf.Empty deleteIndex( + com.google.firestore.admin.v1.DeleteIndexRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteIndexMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the metadata and configuration for a Field.
+     * 
+ */ + public com.google.firestore.admin.v1.Field getField( + com.google.firestore.admin.v1.GetFieldRequest request) { + return blockingUnaryCall(getChannel(), getGetFieldMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a field configuration. Currently, field updates apply only to
+     * single field index configuration. However, calls to
+     * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid
+     * changing any configuration that the caller isn't aware of. The field mask
+     * should be specified as: `{ paths: "index_config" }`.
+     * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to
+     * track the status of the field update. The metadata for
+     * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
+     * To configure the default field settings for the database, use
+     * the special `Field` with resource name:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+     * 
+ */ + public com.google.longrunning.Operation updateField( + com.google.firestore.admin.v1.UpdateFieldRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateFieldMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the field configuration and metadata for this database.
+     * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ */ + public com.google.firestore.admin.v1.ListFieldsResponse listFields( + com.google.firestore.admin.v1.ListFieldsRequest request) { + return blockingUnaryCall( + getChannel(), getListFieldsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports a copy of all or a subset of documents from Google Cloud Firestore
+     * to another storage system, such as Google Cloud Storage. Recent updates to
+     * documents may not be reflected in the export. The export occurs in the
+     * background and its progress can be monitored and managed via the
+     * Operation resource that is created. The output of an export may only be
+     * used once the associated operation is done. If an export operation is
+     * cancelled before completion it may leave partial data behind in Google
+     * Cloud Storage.
+     * 
+ */ + public com.google.longrunning.Operation exportDocuments( + com.google.firestore.admin.v1.ExportDocumentsRequest request) { + return blockingUnaryCall( + getChannel(), getExportDocumentsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports documents into Google Cloud Firestore. Existing documents with the
+     * same name are overwritten. The import occurs in the background and its
+     * progress can be monitored and managed via the Operation resource that is
+     * created. If an ImportDocuments operation is cancelled, it is possible
+     * that a subset of the data has already been imported to Cloud Firestore.
+     * 
+ */ + public com.google.longrunning.Operation importDocuments( + com.google.firestore.admin.v1.ImportDocumentsRequest request) { + return blockingUnaryCall( + getChannel(), getImportDocumentsMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Operations are created by service `FirestoreAdmin`, but are accessed via
+   * service `google.longrunning.Operations`.
+   * 
+ */ + public static final class FirestoreAdminFutureStub + extends io.grpc.stub.AbstractStub { + private FirestoreAdminFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private FirestoreAdminFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirestoreAdminFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirestoreAdminFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
+     * which may be used to track the status of the creation. The metadata for
+     * the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createIndex(com.google.firestore.admin.v1.CreateIndexRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateIndexMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists composite indexes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.ListIndexesResponse> + listIndexes(com.google.firestore.admin.v1.ListIndexesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListIndexesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a composite index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getIndex(com.google.firestore.admin.v1.GetIndexRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetIndexMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a composite index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteIndex(com.google.firestore.admin.v1.DeleteIndexRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteIndexMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the metadata and configuration for a Field.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getField(com.google.firestore.admin.v1.GetFieldRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetFieldMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a field configuration. Currently, field updates apply only to
+     * single field index configuration. However, calls to
+     * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid
+     * changing any configuration that the caller isn't aware of. The field mask
+     * should be specified as: `{ paths: "index_config" }`.
+     * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to
+     * track the status of the field update. The metadata for
+     * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata].
+     * To configure the default field settings for the database, use
+     * the special `Field` with resource name:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateField(com.google.firestore.admin.v1.UpdateFieldRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateFieldMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the field configuration and metadata for this database.
+     * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.admin.v1.ListFieldsResponse> + listFields(com.google.firestore.admin.v1.ListFieldsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListFieldsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports a copy of all or a subset of documents from Google Cloud Firestore
+     * to another storage system, such as Google Cloud Storage. Recent updates to
+     * documents may not be reflected in the export. The export occurs in the
+     * background and its progress can be monitored and managed via the
+     * Operation resource that is created. The output of an export may only be
+     * used once the associated operation is done. If an export operation is
+     * cancelled before completion it may leave partial data behind in Google
+     * Cloud Storage.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportDocuments(com.google.firestore.admin.v1.ExportDocumentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportDocumentsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports documents into Google Cloud Firestore. Existing documents with the
+     * same name are overwritten. The import occurs in the background and its
+     * progress can be monitored and managed via the Operation resource that is
+     * created. If an ImportDocuments operation is cancelled, it is possible
+     * that a subset of the data has already been imported to Cloud Firestore.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importDocuments(com.google.firestore.admin.v1.ImportDocumentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getImportDocumentsMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_INDEX = 0; + private static final int METHODID_LIST_INDEXES = 1; + private static final int METHODID_GET_INDEX = 2; + private static final int METHODID_DELETE_INDEX = 3; + private static final int METHODID_GET_FIELD = 4; + private static final int METHODID_UPDATE_FIELD = 5; + private static final int METHODID_LIST_FIELDS = 6; + private static final int METHODID_EXPORT_DOCUMENTS = 7; + private static final int METHODID_IMPORT_DOCUMENTS = 8; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final FirestoreAdminImplBase serviceImpl; + private final int methodId; + + MethodHandlers(FirestoreAdminImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_INDEX: + serviceImpl.createIndex( + (com.google.firestore.admin.v1.CreateIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INDEXES: + serviceImpl.listIndexes( + (com.google.firestore.admin.v1.ListIndexesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_INDEX: + serviceImpl.getIndex( + (com.google.firestore.admin.v1.GetIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INDEX: + serviceImpl.deleteIndex( + (com.google.firestore.admin.v1.DeleteIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FIELD: + serviceImpl.getField( + (com.google.firestore.admin.v1.GetFieldRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_FIELD: + serviceImpl.updateField( + (com.google.firestore.admin.v1.UpdateFieldRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_FIELDS: + serviceImpl.listFields( + (com.google.firestore.admin.v1.ListFieldsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_EXPORT_DOCUMENTS: + serviceImpl.exportDocuments( + (com.google.firestore.admin.v1.ExportDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_DOCUMENTS: + serviceImpl.importDocuments( + (com.google.firestore.admin.v1.ImportDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class FirestoreAdminBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + FirestoreAdminBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("FirestoreAdmin"); + } + } + + private static final class FirestoreAdminFileDescriptorSupplier + extends FirestoreAdminBaseDescriptorSupplier { + FirestoreAdminFileDescriptorSupplier() {} + } + + private static final class FirestoreAdminMethodDescriptorSupplier + extends FirestoreAdminBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + FirestoreAdminMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (FirestoreAdminGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new FirestoreAdminFileDescriptorSupplier()) + .addMethod(getCreateIndexMethodHelper()) + .addMethod(getListIndexesMethodHelper()) + .addMethod(getGetIndexMethodHelper()) + .addMethod(getDeleteIndexMethodHelper()) + .addMethod(getGetFieldMethodHelper()) + .addMethod(getUpdateFieldMethodHelper()) + .addMethod(getListFieldsMethodHelper()) + .addMethod(getExportDocumentsMethodHelper()) + .addMethod(getImportDocumentsMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java new file mode 100644 index 000000000000..6ec27cf4b34b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java @@ -0,0 +1,865 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CreateIndexRequest} + */ +public final class CreateIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.CreateIndexRequest) + CreateIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateIndexRequest.newBuilder() to construct. + private CreateIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateIndexRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateIndexRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.firestore.admin.v1.Index.Builder subBuilder = null; + if (index_ != null) { + subBuilder = index_.toBuilder(); + } + index_ = + input.readMessage( + com.google.firestore.admin.v1.Index.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(index_); + index_ = 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.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CreateIndexRequest.class, + com.google.firestore.admin.v1.CreateIndexRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 INDEX_FIELD_NUMBER = 2; + private com.google.firestore.admin.v1.Index index_; + /** + * + * + *
+   * The composite index to create.
+   * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public boolean hasIndex() { + return index_ != null; + } + /** + * + * + *
+   * The composite index to create.
+   * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.Index getIndex() { + return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; + } + /** + * + * + *
+   * The composite index to create.
+   * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { + return getIndex(); + } + + 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 (index_ != null) { + output.writeMessage(2, getIndex()); + } + 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 (index_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIndex()); + } + 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.admin.v1.CreateIndexRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.CreateIndexRequest other = + (com.google.firestore.admin.v1.CreateIndexRequest) obj; + + boolean result = true; + result = result && getParent().equals(other.getParent()); + result = result && (hasIndex() == other.hasIndex()); + if (hasIndex()) { + result = result && getIndex().equals(other.getIndex()); + } + 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(); + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.CreateIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest 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.admin.v1.CreateIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest 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.admin.v1.CreateIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest 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.admin.v1.CreateIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest 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.admin.v1.CreateIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest 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.admin.v1.CreateIndexRequest 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 [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.CreateIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.CreateIndexRequest) + com.google.firestore.admin.v1.CreateIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.CreateIndexRequest.class, + com.google.firestore.admin.v1.CreateIndexRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.CreateIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (indexBuilder_ == null) { + index_ = null; + } else { + index_ = null; + indexBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateIndexRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.CreateIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateIndexRequest build() { + com.google.firestore.admin.v1.CreateIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateIndexRequest buildPartial() { + com.google.firestore.admin.v1.CreateIndexRequest result = + new com.google.firestore.admin.v1.CreateIndexRequest(this); + result.parent_ = parent_; + if (indexBuilder_ == null) { + result.index_ = index_; + } else { + result.index_ = indexBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.CreateIndexRequest) { + return mergeFrom((com.google.firestore.admin.v1.CreateIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.CreateIndexRequest other) { + if (other == com.google.firestore.admin.v1.CreateIndexRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasIndex()) { + mergeIndex(other.getIndex()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.CreateIndexRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.CreateIndexRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 com.google.firestore.admin.v1.Index index_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + indexBuilder_; + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public boolean hasIndex() { + return indexBuilder_ != null || index_ != null; + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.Index getIndex() { + if (indexBuilder_ == null) { + return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; + } else { + return indexBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder setIndex(com.google.firestore.admin.v1.Index value) { + if (indexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + onChanged(); + } else { + indexBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder setIndex(com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexBuilder_ == null) { + index_ = builderForValue.build(); + onChanged(); + } else { + indexBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder mergeIndex(com.google.firestore.admin.v1.Index value) { + if (indexBuilder_ == null) { + if (index_ != null) { + index_ = + com.google.firestore.admin.v1.Index.newBuilder(index_) + .mergeFrom(value) + .buildPartial(); + } else { + index_ = value; + } + onChanged(); + } else { + indexBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder clearIndex() { + if (indexBuilder_ == null) { + index_ = null; + onChanged(); + } else { + index_ = null; + indexBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.Index.Builder getIndexBuilder() { + + onChanged(); + return getIndexFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { + if (indexBuilder_ != null) { + return indexBuilder_.getMessageOrBuilder(); + } else { + return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; + } + } + /** + * + * + *
+     * The composite index to create.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + getIndexFieldBuilder() { + if (indexBuilder_ == null) { + indexBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder>( + getIndex(), getParentForChildren(), isClean()); + index_ = null; + } + return indexBuilder_; + } + + @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.admin.v1.CreateIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.CreateIndexRequest) + private static final com.google.firestore.admin.v1.CreateIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.CreateIndexRequest(); + } + + public static com.google.firestore.admin.v1.CreateIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateIndexRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.CreateIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java new file mode 100644 index 000000000000..55ea0848e1e2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequestOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface CreateIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.CreateIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The composite index to create.
+   * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + boolean hasIndex(); + /** + * + * + *
+   * The composite index to create.
+   * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + com.google.firestore.admin.v1.Index getIndex(); + /** + * + * + *
+   * The composite index to create.
+   * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.java new file mode 100644 index 000000000000..ba472b0b6ce4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DatabaseName.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.admin.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 DatabaseName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/databases/{database}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String database; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private DatabaseName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + database = Preconditions.checkNotNull(builder.getDatabase()); + } + + public static DatabaseName of(String project, String database) { + return newBuilder().setProject(project).setDatabase(database).build(); + } + + public static String format(String project, String database) { + return newBuilder().setProject(project).setDatabase(database).build().toString(); + } + + public static DatabaseName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "DatabaseName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("database")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (DatabaseName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("database", database); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "database", database); + } + + /** Builder for DatabaseName. */ + public static class Builder { + + private String project; + private String database; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDatabase(String database) { + this.database = database; + return this; + } + + private Builder() {} + + private Builder(DatabaseName databaseName) { + project = databaseName.project; + database = databaseName.database; + } + + public DatabaseName build() { + return new DatabaseName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DatabaseName) { + DatabaseName that = (DatabaseName) o; + return (this.project.equals(that.project)) && (this.database.equals(that.database)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= database.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java new file mode 100644 index 000000000000..1d887567c0b7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java @@ -0,0 +1,605 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.DeleteIndexRequest} + */ +public final class DeleteIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.DeleteIndexRequest) + DeleteIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteIndexRequest.newBuilder() to construct. + private DeleteIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteIndexRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteIndexRequest( + 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; + } + 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.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.DeleteIndexRequest.class, + com.google.firestore.admin.v1.DeleteIndexRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.admin.v1.DeleteIndexRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.DeleteIndexRequest other = + (com.google.firestore.admin.v1.DeleteIndexRequest) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + 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(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest 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.admin.v1.DeleteIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest 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.admin.v1.DeleteIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest 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.admin.v1.DeleteIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest 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.admin.v1.DeleteIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest 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.admin.v1.DeleteIndexRequest 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 [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.DeleteIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.DeleteIndexRequest) + com.google.firestore.admin.v1.DeleteIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.DeleteIndexRequest.class, + com.google.firestore.admin.v1.DeleteIndexRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.DeleteIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteIndexRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.DeleteIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteIndexRequest build() { + com.google.firestore.admin.v1.DeleteIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteIndexRequest buildPartial() { + com.google.firestore.admin.v1.DeleteIndexRequest result = + new com.google.firestore.admin.v1.DeleteIndexRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.DeleteIndexRequest) { + return mergeFrom((com.google.firestore.admin.v1.DeleteIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.DeleteIndexRequest other) { + if (other == com.google.firestore.admin.v1.DeleteIndexRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.DeleteIndexRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.DeleteIndexRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.admin.v1.DeleteIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.DeleteIndexRequest) + private static final com.google.firestore.admin.v1.DeleteIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.DeleteIndexRequest(); + } + + public static com.google.firestore.admin.v1.DeleteIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteIndexRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.DeleteIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java new file mode 100644 index 000000000000..348bd12c3dce --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface DeleteIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.DeleteIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java new file mode 100644 index 000000000000..7ddc080e3095 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java @@ -0,0 +1,2040 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+ * [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ExportDocumentsMetadata} + */ +public final class ExportDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ExportDocumentsMetadata) + ExportDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDocumentsMetadata.newBuilder() to construct. + private ExportDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDocumentsMetadata() { + operationState_ = 0; + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + outputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDocumentsMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + operationState_ = rawValue; + break; + } + case 34: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressDocuments_ != null) { + subBuilder = progressDocuments_.toBuilder(); + } + progressDocuments_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressDocuments_); + progressDocuments_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressBytes_ != null) { + subBuilder = progressBytes_.toBuilder(); + } + progressBytes_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressBytes_); + progressBytes_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000020; + } + collectionIds_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputUriPrefix_ = 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_ & 0x00000020) == 0x00000020)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ExportDocumentsMetadata.class, + com.google.firestore.admin.v1.ExportDocumentsMetadata.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int OPERATION_STATE_FIELD_NUMBER = 3; + private int operationState_; + /** + * + * + *
+   * The state of the export operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public int getOperationStateValue() { + return operationState_; + } + /** + * + * + *
+   * The state of the export operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public com.google.firestore.admin.v1.OperationState getOperationState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 4; + private com.google.firestore.admin.v1.Progress progressDocuments_; + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public boolean hasProgressDocuments() { + return progressDocuments_ != null; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + return getProgressDocuments(); + } + + public static final int PROGRESS_BYTES_FIELD_NUMBER = 5; + private com.google.firestore.admin.v1.Progress progressBytes_; + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public boolean hasProgressBytes() { + return progressBytes_ != null; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + return getProgressBytes(); + } + + public static final int COLLECTION_IDS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList collectionIds_; + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_; + } + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + + public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 7; + private volatile java.lang.Object outputUriPrefix_; + /** + * + * + *
+   * Where the entities are being exported to.
+   * 
+ * + * string output_uri_prefix = 7; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + 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(); + outputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Where the entities are being exported to.
+   * 
+ * + * string output_uri_prefix = 7; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, operationState_); + } + if (progressDocuments_ != null) { + output.writeMessage(4, getProgressDocuments()); + } + if (progressBytes_ != null) { + output.writeMessage(5, getProgressBytes()); + } + for (int i = 0; i < collectionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, collectionIds_.getRaw(i)); + } + if (!getOutputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, outputUriPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, operationState_); + } + if (progressDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getProgressDocuments()); + } + if (progressBytes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProgressBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < collectionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(collectionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getCollectionIdsList().size(); + } + if (!getOutputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, outputUriPrefix_); + } + 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.admin.v1.ExportDocumentsMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ExportDocumentsMetadata other = + (com.google.firestore.admin.v1.ExportDocumentsMetadata) obj; + + boolean result = true; + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && getStartTime().equals(other.getStartTime()); + } + result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime()) { + result = result && getEndTime().equals(other.getEndTime()); + } + result = result && operationState_ == other.operationState_; + result = result && (hasProgressDocuments() == other.hasProgressDocuments()); + if (hasProgressDocuments()) { + result = result && getProgressDocuments().equals(other.getProgressDocuments()); + } + result = result && (hasProgressBytes() == other.hasProgressBytes()); + if (hasProgressBytes()) { + result = result && getProgressBytes().equals(other.getProgressBytes()); + } + result = result && getCollectionIdsList().equals(other.getCollectionIdsList()); + result = result && getOutputUriPrefix().equals(other.getOutputUriPrefix()); + 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + OPERATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + operationState_; + if (hasProgressDocuments()) { + hash = (37 * hash) + PROGRESS_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getProgressDocuments().hashCode(); + } + if (hasProgressBytes()) { + hash = (37 * hash) + PROGRESS_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProgressBytes().hashCode(); + } + if (getCollectionIdsCount() > 0) { + hash = (37 * hash) + COLLECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionIdsList().hashCode(); + } + hash = (37 * hash) + OUTPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getOutputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata 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.admin.v1.ExportDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata 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.admin.v1.ExportDocumentsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata 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.admin.v1.ExportDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata 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.admin.v1.ExportDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata 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.admin.v1.ExportDocumentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+   * [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ExportDocumentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ExportDocumentsMetadata) + com.google.firestore.admin.v1.ExportDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ExportDocumentsMetadata.class, + com.google.firestore.admin.v1.ExportDocumentsMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ExportDocumentsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + operationState_ = 0; + + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + outputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ExportDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsMetadata build() { + com.google.firestore.admin.v1.ExportDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsMetadata buildPartial() { + com.google.firestore.admin.v1.ExportDocumentsMetadata result = + new com.google.firestore.admin.v1.ExportDocumentsMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.operationState_ = operationState_; + if (progressDocumentsBuilder_ == null) { + result.progressDocuments_ = progressDocuments_; + } else { + result.progressDocuments_ = progressDocumentsBuilder_.build(); + } + if (progressBytesBuilder_ == null) { + result.progressBytes_ = progressBytes_; + } else { + result.progressBytes_ = progressBytesBuilder_.build(); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.collectionIds_ = collectionIds_; + result.outputUriPrefix_ = outputUriPrefix_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ExportDocumentsMetadata) { + return mergeFrom((com.google.firestore.admin.v1.ExportDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ExportDocumentsMetadata other) { + if (other == com.google.firestore.admin.v1.ExportDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.operationState_ != 0) { + setOperationStateValue(other.getOperationStateValue()); + } + if (other.hasProgressDocuments()) { + mergeProgressDocuments(other.getProgressDocuments()); + } + if (other.hasProgressBytes()) { + mergeProgressBytes(other.getProgressBytes()); + } + if (!other.collectionIds_.isEmpty()) { + if (collectionIds_.isEmpty()) { + collectionIds_ = other.collectionIds_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureCollectionIdsIsMutable(); + collectionIds_.addAll(other.collectionIds_); + } + onChanged(); + } + if (!other.getOutputUriPrefix().isEmpty()) { + outputUriPrefix_ = other.outputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ExportDocumentsMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.ExportDocumentsMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int operationState_ = 0; + /** + * + * + *
+     * The state of the export operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public int getOperationStateValue() { + return operationState_; + } + /** + * + * + *
+     * The state of the export operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public Builder setOperationStateValue(int value) { + operationState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the export operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public com.google.firestore.admin.v1.OperationState getOperationState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the export operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public Builder setOperationState(com.google.firestore.admin.v1.OperationState value) { + if (value == null) { + throw new NullPointerException(); + } + + operationState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the export operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public Builder clearOperationState() { + + operationState_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.Progress progressDocuments_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressDocumentsBuilder_; + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public boolean hasProgressDocuments() { + return progressDocumentsBuilder_ != null || progressDocuments_ != null; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } else { + return progressDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressDocuments_ = value; + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder setProgressDocuments( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = builderForValue.build(); + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (progressDocuments_ != null) { + progressDocuments_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + progressDocuments_ = value; + } + onChanged(); + } else { + progressDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder clearProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + onChanged(); + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilder() { + + onChanged(); + return getProgressDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + if (progressDocumentsBuilder_ != null) { + return progressDocumentsBuilder_.getMessageOrBuilder(); + } else { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressDocumentsFieldBuilder() { + if (progressDocumentsBuilder_ == null) { + progressDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressDocuments(), getParentForChildren(), isClean()); + progressDocuments_ = null; + } + return progressDocumentsBuilder_; + } + + private com.google.firestore.admin.v1.Progress progressBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressBytesBuilder_; + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public boolean hasProgressBytes() { + return progressBytesBuilder_ != null || progressBytes_ != null; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + if (progressBytesBuilder_ == null) { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } else { + return progressBytesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressBytes_ = value; + onChanged(); + } else { + progressBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder setProgressBytes( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressBytesBuilder_ == null) { + progressBytes_ = builderForValue.build(); + onChanged(); + } else { + progressBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (progressBytes_ != null) { + progressBytes_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressBytes_) + .mergeFrom(value) + .buildPartial(); + } else { + progressBytes_ = value; + } + onChanged(); + } else { + progressBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder clearProgressBytes() { + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + onChanged(); + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() { + + onChanged(); + return getProgressBytesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + if (progressBytesBuilder_ != null) { + return progressBytesBuilder_.getMessageOrBuilder(); + } else { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressBytesFieldBuilder() { + if (progressBytesBuilder_ == null) { + progressBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressBytes(), getParentForChildren(), isClean()); + progressBytes_ = null; + } + return progressBytesBuilder_; + } + + private com.google.protobuf.LazyStringList collectionIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCollectionIdsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(collectionIds_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder setCollectionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder addCollectionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder addAllCollectionIds(java.lang.Iterable values) { + ensureCollectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder clearCollectionIds() { + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being exported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object outputUriPrefix_ = ""; + /** + * + * + *
+     * Where the entities are being exported to.
+     * 
+ * + * string output_uri_prefix = 7; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Where the entities are being exported to.
+     * 
+ * + * string output_uri_prefix = 7; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Where the entities are being exported to.
+     * 
+ * + * string output_uri_prefix = 7; + */ + public Builder setOutputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Where the entities are being exported to.
+     * 
+ * + * string output_uri_prefix = 7; + */ + public Builder clearOutputUriPrefix() { + + outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Where the entities are being exported to.
+     * 
+ * + * string output_uri_prefix = 7; + */ + public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUriPrefix_ = 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.admin.v1.ExportDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ExportDocumentsMetadata) + private static final com.google.firestore.admin.v1.ExportDocumentsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ExportDocumentsMetadata(); + } + + public static com.google.firestore.admin.v1.ExportDocumentsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDocumentsMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000000..f97a258621f3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadataOrBuilder.java @@ -0,0 +1,220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public interface ExportDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ExportDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The state of the export operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + int getOperationStateValue(); + /** + * + * + *
+   * The state of the export operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + com.google.firestore.admin.v1.OperationState getOperationState(); + + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + boolean hasProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder(); + + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + boolean hasProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + com.google.firestore.admin.v1.Progress getProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder(); + + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + java.util.List getCollectionIdsList(); + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + int getCollectionIdsCount(); + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + java.lang.String getCollectionIds(int index); + /** + * + * + *
+   * Which collection ids are being exported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + com.google.protobuf.ByteString getCollectionIdsBytes(int index); + + /** + * + * + *
+   * Where the entities are being exported to.
+   * 
+ * + * string output_uri_prefix = 7; + */ + java.lang.String getOutputUriPrefix(); + /** + * + * + *
+   * Where the entities are being exported to.
+   * 
+ * + * string output_uri_prefix = 7; + */ + com.google.protobuf.ByteString getOutputUriPrefixBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java new file mode 100644 index 000000000000..a0e6235d075d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java @@ -0,0 +1,1063 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ExportDocumentsRequest} + */ +public final class ExportDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ExportDocumentsRequest) + ExportDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDocumentsRequest.newBuilder() to construct. + private ExportDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDocumentsRequest() { + name_ = ""; + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + outputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDocumentsRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + collectionIds_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputUriPrefix_ = 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_ & 0x00000002) == 0x00000002)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ExportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ExportDocumentsRequest.class, + com.google.firestore.admin.v1.ExportDocumentsRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Database to export. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Database to export. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * 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 COLLECTION_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList collectionIds_; + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_; + } + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + + public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 3; + private volatile java.lang.Object outputUriPrefix_; + /** + * + * + *
+   * The output URI. Currently only supports Google Cloud Storage URIs of the
+   * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+   * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+   * Google Cloud Storage namespace path. When
+   * choosing a name, be sure to consider Google Cloud Storage naming
+   * guidelines: https://cloud.google.com/storage/docs/naming.
+   * If the URI is a bucket (without a namespace path), a prefix will be
+   * generated based on the start time.
+   * 
+ * + * string output_uri_prefix = 3; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + 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(); + outputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * The output URI. Currently only supports Google Cloud Storage URIs of the
+   * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+   * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+   * Google Cloud Storage namespace path. When
+   * choosing a name, be sure to consider Google Cloud Storage naming
+   * guidelines: https://cloud.google.com/storage/docs/naming.
+   * If the URI is a bucket (without a namespace path), a prefix will be
+   * generated based on the start time.
+   * 
+ * + * string output_uri_prefix = 3; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < collectionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collectionIds_.getRaw(i)); + } + if (!getOutputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, outputUriPrefix_); + } + 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_); + } + { + int dataSize = 0; + for (int i = 0; i < collectionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(collectionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getCollectionIdsList().size(); + } + if (!getOutputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, outputUriPrefix_); + } + 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.admin.v1.ExportDocumentsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ExportDocumentsRequest other = + (com.google.firestore.admin.v1.ExportDocumentsRequest) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + result = result && getCollectionIdsList().equals(other.getCollectionIdsList()); + result = result && getOutputUriPrefix().equals(other.getOutputUriPrefix()); + 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 (getCollectionIdsCount() > 0) { + hash = (37 * hash) + COLLECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionIdsList().hashCode(); + } + hash = (37 * hash) + OUTPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getOutputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest 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.admin.v1.ExportDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest 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.admin.v1.ExportDocumentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest 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.admin.v1.ExportDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest 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.admin.v1.ExportDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest 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.admin.v1.ExportDocumentsRequest 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 [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ExportDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ExportDocumentsRequest) + com.google.firestore.admin.v1.ExportDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ExportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ExportDocumentsRequest.class, + com.google.firestore.admin.v1.ExportDocumentsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ExportDocumentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + outputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ExportDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsRequest build() { + com.google.firestore.admin.v1.ExportDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsRequest buildPartial() { + com.google.firestore.admin.v1.ExportDocumentsRequest result = + new com.google.firestore.admin.v1.ExportDocumentsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.collectionIds_ = collectionIds_; + result.outputUriPrefix_ = outputUriPrefix_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ExportDocumentsRequest) { + return mergeFrom((com.google.firestore.admin.v1.ExportDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ExportDocumentsRequest other) { + if (other == com.google.firestore.admin.v1.ExportDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.collectionIds_.isEmpty()) { + if (collectionIds_.isEmpty()) { + collectionIds_ = other.collectionIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCollectionIdsIsMutable(); + collectionIds_.addAll(other.collectionIds_); + } + onChanged(); + } + if (!other.getOutputUriPrefix().isEmpty()) { + outputUriPrefix_ = other.outputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ExportDocumentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.ExportDocumentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Database to export. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Database to export. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Database to export. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Database to export. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Database to export. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * 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.LazyStringList collectionIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCollectionIdsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(collectionIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder setCollectionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder addCollectionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder addAllCollectionIds(java.lang.Iterable values) { + ensureCollectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder clearCollectionIds() { + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to export. Unspecified means all collections.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object outputUriPrefix_ = ""; + /** + * + * + *
+     * The output URI. Currently only supports Google Cloud Storage URIs of the
+     * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+     * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+     * Google Cloud Storage namespace path. When
+     * choosing a name, be sure to consider Google Cloud Storage naming
+     * guidelines: https://cloud.google.com/storage/docs/naming.
+     * If the URI is a bucket (without a namespace path), a prefix will be
+     * generated based on the start time.
+     * 
+ * + * string output_uri_prefix = 3; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The output URI. Currently only supports Google Cloud Storage URIs of the
+     * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+     * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+     * Google Cloud Storage namespace path. When
+     * choosing a name, be sure to consider Google Cloud Storage naming
+     * guidelines: https://cloud.google.com/storage/docs/naming.
+     * If the URI is a bucket (without a namespace path), a prefix will be
+     * generated based on the start time.
+     * 
+ * + * string output_uri_prefix = 3; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The output URI. Currently only supports Google Cloud Storage URIs of the
+     * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+     * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+     * Google Cloud Storage namespace path. When
+     * choosing a name, be sure to consider Google Cloud Storage naming
+     * guidelines: https://cloud.google.com/storage/docs/naming.
+     * If the URI is a bucket (without a namespace path), a prefix will be
+     * generated based on the start time.
+     * 
+ * + * string output_uri_prefix = 3; + */ + public Builder setOutputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The output URI. Currently only supports Google Cloud Storage URIs of the
+     * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+     * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+     * Google Cloud Storage namespace path. When
+     * choosing a name, be sure to consider Google Cloud Storage naming
+     * guidelines: https://cloud.google.com/storage/docs/naming.
+     * If the URI is a bucket (without a namespace path), a prefix will be
+     * generated based on the start time.
+     * 
+ * + * string output_uri_prefix = 3; + */ + public Builder clearOutputUriPrefix() { + + outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * The output URI. Currently only supports Google Cloud Storage URIs of the
+     * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+     * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+     * Google Cloud Storage namespace path. When
+     * choosing a name, be sure to consider Google Cloud Storage naming
+     * guidelines: https://cloud.google.com/storage/docs/naming.
+     * If the URI is a bucket (without a namespace path), a prefix will be
+     * generated based on the start time.
+     * 
+ * + * string output_uri_prefix = 3; + */ + public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUriPrefix_ = 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.admin.v1.ExportDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ExportDocumentsRequest) + private static final com.google.firestore.admin.v1.ExportDocumentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ExportDocumentsRequest(); + } + + public static com.google.firestore.admin.v1.ExportDocumentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDocumentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..180b898ffc62 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java @@ -0,0 +1,109 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface ExportDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ExportDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Database to export. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Database to export. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + java.util.List getCollectionIdsList(); + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + int getCollectionIdsCount(); + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + java.lang.String getCollectionIds(int index); + /** + * + * + *
+   * Which collection ids to export. Unspecified means all collections.
+   * 
+ * + * repeated string collection_ids = 2; + */ + com.google.protobuf.ByteString getCollectionIdsBytes(int index); + + /** + * + * + *
+   * The output URI. Currently only supports Google Cloud Storage URIs of the
+   * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+   * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+   * Google Cloud Storage namespace path. When
+   * choosing a name, be sure to consider Google Cloud Storage naming
+   * guidelines: https://cloud.google.com/storage/docs/naming.
+   * If the URI is a bucket (without a namespace path), a prefix will be
+   * generated based on the start time.
+   * 
+ * + * string output_uri_prefix = 3; + */ + java.lang.String getOutputUriPrefix(); + /** + * + * + *
+   * The output URI. Currently only supports Google Cloud Storage URIs of the
+   * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
+   * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional
+   * Google Cloud Storage namespace path. When
+   * choosing a name, be sure to consider Google Cloud Storage naming
+   * guidelines: https://cloud.google.com/storage/docs/naming.
+   * If the URI is a bucket (without a namespace path), a prefix will be
+   * generated based on the start time.
+   * 
+ * + * string output_uri_prefix = 3; + */ + com.google.protobuf.ByteString getOutputUriPrefixBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java new file mode 100644 index 000000000000..6fe726211a8d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ExportDocumentsResponse} + */ +public final class ExportDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ExportDocumentsResponse) + ExportDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDocumentsResponse.newBuilder() to construct. + private ExportDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDocumentsResponse() { + outputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDocumentsResponse( + 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(); + + outputUriPrefix_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ExportDocumentsResponse.class, + com.google.firestore.admin.v1.ExportDocumentsResponse.Builder.class); + } + + public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUriPrefix_; + /** + * + * + *
+   * Location of the output files. This can be used to begin an import
+   * into Cloud Firestore (this project or another project) after the operation
+   * completes successfully.
+   * 
+ * + * string output_uri_prefix = 1; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + 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(); + outputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Location of the output files. This can be used to begin an import
+   * into Cloud Firestore (this project or another project) after the operation
+   * completes successfully.
+   * 
+ * + * string output_uri_prefix = 1; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOutputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_); + } + 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.admin.v1.ExportDocumentsResponse)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ExportDocumentsResponse other = + (com.google.firestore.admin.v1.ExportDocumentsResponse) obj; + + boolean result = true; + result = result && getOutputUriPrefix().equals(other.getOutputUriPrefix()); + 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) + OUTPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getOutputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse 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.admin.v1.ExportDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse 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.admin.v1.ExportDocumentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse 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.admin.v1.ExportDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse 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.admin.v1.ExportDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse 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.admin.v1.ExportDocumentsResponse 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; + } + /** + * + * + *
+   * Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ExportDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ExportDocumentsResponse) + com.google.firestore.admin.v1.ExportDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ExportDocumentsResponse.class, + com.google.firestore.admin.v1.ExportDocumentsResponse.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ExportDocumentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + outputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsResponse getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ExportDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsResponse build() { + com.google.firestore.admin.v1.ExportDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsResponse buildPartial() { + com.google.firestore.admin.v1.ExportDocumentsResponse result = + new com.google.firestore.admin.v1.ExportDocumentsResponse(this); + result.outputUriPrefix_ = outputUriPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ExportDocumentsResponse) { + return mergeFrom((com.google.firestore.admin.v1.ExportDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ExportDocumentsResponse other) { + if (other == com.google.firestore.admin.v1.ExportDocumentsResponse.getDefaultInstance()) + return this; + if (!other.getOutputUriPrefix().isEmpty()) { + outputUriPrefix_ = other.outputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ExportDocumentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.ExportDocumentsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputUriPrefix_ = ""; + /** + * + * + *
+     * Location of the output files. This can be used to begin an import
+     * into Cloud Firestore (this project or another project) after the operation
+     * completes successfully.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location of the output files. This can be used to begin an import
+     * into Cloud Firestore (this project or another project) after the operation
+     * completes successfully.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location of the output files. This can be used to begin an import
+     * into Cloud Firestore (this project or another project) after the operation
+     * completes successfully.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public Builder setOutputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Location of the output files. This can be used to begin an import
+     * into Cloud Firestore (this project or another project) after the operation
+     * completes successfully.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public Builder clearOutputUriPrefix() { + + outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Location of the output files. This can be used to begin an import
+     * into Cloud Firestore (this project or another project) after the operation
+     * completes successfully.
+     * 
+ * + * string output_uri_prefix = 1; + */ + public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUriPrefix_ = 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.admin.v1.ExportDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ExportDocumentsResponse) + private static final com.google.firestore.admin.v1.ExportDocumentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ExportDocumentsResponse(); + } + + public static com.google.firestore.admin.v1.ExportDocumentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDocumentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ExportDocumentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java new file mode 100644 index 000000000000..fa2fabdedb07 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponseOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public interface ExportDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ExportDocumentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Location of the output files. This can be used to begin an import
+   * into Cloud Firestore (this project or another project) after the operation
+   * completes successfully.
+   * 
+ * + * string output_uri_prefix = 1; + */ + java.lang.String getOutputUriPrefix(); + /** + * + * + *
+   * Location of the output files. This can be used to begin an import
+   * into Cloud Firestore (this project or another project) after the operation
+   * completes successfully.
+   * 
+ * + * string output_uri_prefix = 1; + */ + com.google.protobuf.ByteString getOutputUriPrefixBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java new file mode 100644 index 000000000000..cd4f1f7afcc2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java @@ -0,0 +1,2470 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/field.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Represents a single field in the database.
+ * Fields are grouped by their "Collection Group", which represent all
+ * collections in the database with the same id.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Field} + */ +public final class Field extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Field) + FieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Field() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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.admin.v1.Field.IndexConfig.Builder subBuilder = null; + if (indexConfig_ != null) { + subBuilder = indexConfig_.toBuilder(); + } + indexConfig_ = + input.readMessage( + com.google.firestore.admin.v1.Field.IndexConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexConfig_); + indexConfig_ = 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.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Field.class, + com.google.firestore.admin.v1.Field.Builder.class); + } + + public interface IndexConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Field.IndexConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + java.util.List getIndexesList(); + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + com.google.firestore.admin.v1.Index getIndexes(int index); + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + int getIndexesCount(); + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + java.util.List + getIndexesOrBuilderList(); + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index); + + /** + * + * + *
+     * Output only.
+     * When true, the `Field`'s index configuration is set from the
+     * configuration specified by the `ancestor_field`.
+     * When false, the `Field`'s index configuration is defined explicitly.
+     * 
+ * + * bool uses_ancestor_config = 2; + */ + boolean getUsesAncestorConfig(); + + /** + * + * + *
+     * Output only.
+     * Specifies the resource name of the `Field` from which this field's
+     * index configuration is set (when `uses_ancestor_config` is true),
+     * or from which it *would* be set if this field had no index configuration
+     * (when `uses_ancestor_config` is false).
+     * 
+ * + * string ancestor_field = 3; + */ + java.lang.String getAncestorField(); + /** + * + * + *
+     * Output only.
+     * Specifies the resource name of the `Field` from which this field's
+     * index configuration is set (when `uses_ancestor_config` is true),
+     * or from which it *would* be set if this field had no index configuration
+     * (when `uses_ancestor_config` is false).
+     * 
+ * + * string ancestor_field = 3; + */ + com.google.protobuf.ByteString getAncestorFieldBytes(); + + /** + * + * + *
+     * Output only
+     * When true, the `Field`'s index configuration is in the process of being
+     * reverted. Once complete, the index config will transition to the same
+     * state as the field specified by `ancestor_field`, at which point
+     * `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+     * 
+ * + * bool reverting = 4; + */ + boolean getReverting(); + } + /** + * + * + *
+   * The index configuration for this field.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Field.IndexConfig} + */ + public static final class IndexConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Field.IndexConfig) + IndexConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexConfig.newBuilder() to construct. + private IndexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexConfig() { + indexes_ = java.util.Collections.emptyList(); + usesAncestorConfig_ = false; + ancestorField_ = ""; + reverting_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexConfig( + 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)) { + indexes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + indexes_.add( + input.readMessage( + com.google.firestore.admin.v1.Index.parser(), extensionRegistry)); + break; + } + case 16: + { + usesAncestorConfig_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + ancestorField_ = s; + break; + } + case 32: + { + reverting_ = input.readBool(); + 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)) { + indexes_ = java.util.Collections.unmodifiableList(indexes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_IndexConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_IndexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Field.IndexConfig.class, + com.google.firestore.admin.v1.Field.IndexConfig.Builder.class); + } + + private int bitField0_; + public static final int INDEXES_FIELD_NUMBER = 1; + private java.util.List indexes_; + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List getIndexesList() { + return indexes_; + } + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List + getIndexesOrBuilderList() { + return indexes_; + } + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public int getIndexesCount() { + return indexes_.size(); + } + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index getIndexes(int index) { + return indexes_.get(index); + } + /** + * + * + *
+     * The indexes supported for this field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index) { + return indexes_.get(index); + } + + public static final int USES_ANCESTOR_CONFIG_FIELD_NUMBER = 2; + private boolean usesAncestorConfig_; + /** + * + * + *
+     * Output only.
+     * When true, the `Field`'s index configuration is set from the
+     * configuration specified by the `ancestor_field`.
+     * When false, the `Field`'s index configuration is defined explicitly.
+     * 
+ * + * bool uses_ancestor_config = 2; + */ + public boolean getUsesAncestorConfig() { + return usesAncestorConfig_; + } + + public static final int ANCESTOR_FIELD_FIELD_NUMBER = 3; + private volatile java.lang.Object ancestorField_; + /** + * + * + *
+     * Output only.
+     * Specifies the resource name of the `Field` from which this field's
+     * index configuration is set (when `uses_ancestor_config` is true),
+     * or from which it *would* be set if this field had no index configuration
+     * (when `uses_ancestor_config` is false).
+     * 
+ * + * string ancestor_field = 3; + */ + public java.lang.String getAncestorField() { + java.lang.Object ref = ancestorField_; + 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(); + ancestorField_ = s; + return s; + } + } + /** + * + * + *
+     * Output only.
+     * Specifies the resource name of the `Field` from which this field's
+     * index configuration is set (when `uses_ancestor_config` is true),
+     * or from which it *would* be set if this field had no index configuration
+     * (when `uses_ancestor_config` is false).
+     * 
+ * + * string ancestor_field = 3; + */ + public com.google.protobuf.ByteString getAncestorFieldBytes() { + java.lang.Object ref = ancestorField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ancestorField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVERTING_FIELD_NUMBER = 4; + private boolean reverting_; + /** + * + * + *
+     * Output only
+     * When true, the `Field`'s index configuration is in the process of being
+     * reverted. Once complete, the index config will transition to the same
+     * state as the field specified by `ancestor_field`, at which point
+     * `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+     * 
+ * + * bool reverting = 4; + */ + public boolean getReverting() { + return reverting_; + } + + 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 < indexes_.size(); i++) { + output.writeMessage(1, indexes_.get(i)); + } + if (usesAncestorConfig_ != false) { + output.writeBool(2, usesAncestorConfig_); + } + if (!getAncestorFieldBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestorField_); + } + if (reverting_ != false) { + output.writeBool(4, reverting_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < indexes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexes_.get(i)); + } + if (usesAncestorConfig_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, usesAncestorConfig_); + } + if (!getAncestorFieldBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ancestorField_); + } + if (reverting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, reverting_); + } + 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.admin.v1.Field.IndexConfig)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Field.IndexConfig other = + (com.google.firestore.admin.v1.Field.IndexConfig) obj; + + boolean result = true; + result = result && getIndexesList().equals(other.getIndexesList()); + result = result && (getUsesAncestorConfig() == other.getUsesAncestorConfig()); + result = result && getAncestorField().equals(other.getAncestorField()); + result = result && (getReverting() == other.getReverting()); + 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 (getIndexesCount() > 0) { + hash = (37 * hash) + INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getIndexesList().hashCode(); + } + hash = (37 * hash) + USES_ANCESTOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsesAncestorConfig()); + hash = (37 * hash) + ANCESTOR_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getAncestorField().hashCode(); + hash = (37 * hash) + REVERTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReverting()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Field.IndexConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig 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.admin.v1.Field.IndexConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig 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.admin.v1.Field.IndexConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig 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.admin.v1.Field.IndexConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig 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.admin.v1.Field.IndexConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig 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.admin.v1.Field.IndexConfig 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 index configuration for this field.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Field.IndexConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Field.IndexConfig) + com.google.firestore.admin.v1.Field.IndexConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_IndexConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_IndexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Field.IndexConfig.class, + com.google.firestore.admin.v1.Field.IndexConfig.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Field.IndexConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIndexesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (indexesBuilder_ == null) { + indexes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + indexesBuilder_.clear(); + } + usesAncestorConfig_ = false; + + ancestorField_ = ""; + + reverting_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_IndexConfig_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field.IndexConfig getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field.IndexConfig build() { + com.google.firestore.admin.v1.Field.IndexConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field.IndexConfig buildPartial() { + com.google.firestore.admin.v1.Field.IndexConfig result = + new com.google.firestore.admin.v1.Field.IndexConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (indexesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + indexes_ = java.util.Collections.unmodifiableList(indexes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indexes_ = indexes_; + } else { + result.indexes_ = indexesBuilder_.build(); + } + result.usesAncestorConfig_ = usesAncestorConfig_; + result.ancestorField_ = ancestorField_; + result.reverting_ = reverting_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Field.IndexConfig) { + return mergeFrom((com.google.firestore.admin.v1.Field.IndexConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Field.IndexConfig other) { + if (other == com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance()) + return this; + if (indexesBuilder_ == null) { + if (!other.indexes_.isEmpty()) { + if (indexes_.isEmpty()) { + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndexesIsMutable(); + indexes_.addAll(other.indexes_); + } + onChanged(); + } + } else { + if (!other.indexes_.isEmpty()) { + if (indexesBuilder_.isEmpty()) { + indexesBuilder_.dispose(); + indexesBuilder_ = null; + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + indexesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndexesFieldBuilder() + : null; + } else { + indexesBuilder_.addAllMessages(other.indexes_); + } + } + } + if (other.getUsesAncestorConfig() != false) { + setUsesAncestorConfig(other.getUsesAncestorConfig()); + } + if (!other.getAncestorField().isEmpty()) { + ancestorField_ = other.ancestorField_; + onChanged(); + } + if (other.getReverting() != false) { + setReverting(other.getReverting()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.Field.IndexConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.Field.IndexConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List indexes_ = + java.util.Collections.emptyList(); + + private void ensureIndexesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + indexes_ = new java.util.ArrayList(indexes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + indexesBuilder_; + + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List getIndexesList() { + if (indexesBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexes_); + } else { + return indexesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public int getIndexesCount() { + if (indexesBuilder_ == null) { + return indexes_.size(); + } else { + return indexesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index getIndexes(int index) { + if (indexesBuilder_ == null) { + return indexes_.get(index); + } else { + return indexesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder setIndexes(int index, com.google.firestore.admin.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.set(index, value); + onChanged(); + } else { + indexesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder setIndexes( + int index, com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.set(index, builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes(com.google.firestore.admin.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.add(value); + onChanged(); + } else { + indexesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes(int index, com.google.firestore.admin.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.add(index, value); + onChanged(); + } else { + indexesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes(com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes( + int index, com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(index, builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addAllIndexes( + java.lang.Iterable values) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexes_); + onChanged(); + } else { + indexesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder clearIndexes() { + if (indexesBuilder_ == null) { + indexes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + indexesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder removeIndexes(int index) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.remove(index); + onChanged(); + } else { + indexesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index.Builder getIndexesBuilder(int index) { + return getIndexesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index) { + if (indexesBuilder_ == null) { + return indexes_.get(index); + } else { + return indexesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List + getIndexesOrBuilderList() { + if (indexesBuilder_ != null) { + return indexesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexes_); + } + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder() { + return getIndexesFieldBuilder() + .addBuilder(com.google.firestore.admin.v1.Index.getDefaultInstance()); + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder(int index) { + return getIndexesFieldBuilder() + .addBuilder(index, com.google.firestore.admin.v1.Index.getDefaultInstance()); + } + /** + * + * + *
+       * The indexes supported for this field.
+       * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List getIndexesBuilderList() { + return getIndexesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + getIndexesFieldBuilder() { + if (indexesBuilder_ == null) { + indexesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder>( + indexes_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + indexes_ = null; + } + return indexesBuilder_; + } + + private boolean usesAncestorConfig_; + /** + * + * + *
+       * Output only.
+       * When true, the `Field`'s index configuration is set from the
+       * configuration specified by the `ancestor_field`.
+       * When false, the `Field`'s index configuration is defined explicitly.
+       * 
+ * + * bool uses_ancestor_config = 2; + */ + public boolean getUsesAncestorConfig() { + return usesAncestorConfig_; + } + /** + * + * + *
+       * Output only.
+       * When true, the `Field`'s index configuration is set from the
+       * configuration specified by the `ancestor_field`.
+       * When false, the `Field`'s index configuration is defined explicitly.
+       * 
+ * + * bool uses_ancestor_config = 2; + */ + public Builder setUsesAncestorConfig(boolean value) { + + usesAncestorConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only.
+       * When true, the `Field`'s index configuration is set from the
+       * configuration specified by the `ancestor_field`.
+       * When false, the `Field`'s index configuration is defined explicitly.
+       * 
+ * + * bool uses_ancestor_config = 2; + */ + public Builder clearUsesAncestorConfig() { + + usesAncestorConfig_ = false; + onChanged(); + return this; + } + + private java.lang.Object ancestorField_ = ""; + /** + * + * + *
+       * Output only.
+       * Specifies the resource name of the `Field` from which this field's
+       * index configuration is set (when `uses_ancestor_config` is true),
+       * or from which it *would* be set if this field had no index configuration
+       * (when `uses_ancestor_config` is false).
+       * 
+ * + * string ancestor_field = 3; + */ + public java.lang.String getAncestorField() { + java.lang.Object ref = ancestorField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ancestorField_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only.
+       * Specifies the resource name of the `Field` from which this field's
+       * index configuration is set (when `uses_ancestor_config` is true),
+       * or from which it *would* be set if this field had no index configuration
+       * (when `uses_ancestor_config` is false).
+       * 
+ * + * string ancestor_field = 3; + */ + public com.google.protobuf.ByteString getAncestorFieldBytes() { + java.lang.Object ref = ancestorField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ancestorField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only.
+       * Specifies the resource name of the `Field` from which this field's
+       * index configuration is set (when `uses_ancestor_config` is true),
+       * or from which it *would* be set if this field had no index configuration
+       * (when `uses_ancestor_config` is false).
+       * 
+ * + * string ancestor_field = 3; + */ + public Builder setAncestorField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ancestorField_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only.
+       * Specifies the resource name of the `Field` from which this field's
+       * index configuration is set (when `uses_ancestor_config` is true),
+       * or from which it *would* be set if this field had no index configuration
+       * (when `uses_ancestor_config` is false).
+       * 
+ * + * string ancestor_field = 3; + */ + public Builder clearAncestorField() { + + ancestorField_ = getDefaultInstance().getAncestorField(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only.
+       * Specifies the resource name of the `Field` from which this field's
+       * index configuration is set (when `uses_ancestor_config` is true),
+       * or from which it *would* be set if this field had no index configuration
+       * (when `uses_ancestor_config` is false).
+       * 
+ * + * string ancestor_field = 3; + */ + public Builder setAncestorFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ancestorField_ = value; + onChanged(); + return this; + } + + private boolean reverting_; + /** + * + * + *
+       * Output only
+       * When true, the `Field`'s index configuration is in the process of being
+       * reverted. Once complete, the index config will transition to the same
+       * state as the field specified by `ancestor_field`, at which point
+       * `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+       * 
+ * + * bool reverting = 4; + */ + public boolean getReverting() { + return reverting_; + } + /** + * + * + *
+       * Output only
+       * When true, the `Field`'s index configuration is in the process of being
+       * reverted. Once complete, the index config will transition to the same
+       * state as the field specified by `ancestor_field`, at which point
+       * `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+       * 
+ * + * bool reverting = 4; + */ + public Builder setReverting(boolean value) { + + reverting_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only
+       * When true, the `Field`'s index configuration is in the process of being
+       * reverted. Once complete, the index config will transition to the same
+       * state as the field specified by `ancestor_field`, at which point
+       * `uses_ancestor_config` will be `true` and `reverting` will be `false`.
+       * 
+ * + * bool reverting = 4; + */ + public Builder clearReverting() { + + reverting_ = 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.admin.v1.Field.IndexConfig) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Field.IndexConfig) + private static final com.google.firestore.admin.v1.Field.IndexConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Field.IndexConfig(); + } + + public static com.google.firestore.admin.v1.Field.IndexConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field.IndexConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A field name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * A field path may be a simple field name, e.g. `address` or a path to fields
+   * within map_value , e.g. `address.city`,
+   * or a special field path. The only valid special field is `*`, which
+   * represents any field.
+   * Field paths may be quoted using ` (backtick). The only character that needs
+   * to be escaped within a quoted field path is the backtick character itself,
+   * escaped using a backslash. Special characters in field paths that
+   * must be quoted include: `*`, `.`,
+   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * Examples:
+   * (Note: Comments here are written in markdown syntax, so there is an
+   *  additional layer of backticks to represent a code block)
+   * `\`address.city\`` represents a field named `address.city`, not the map key
+   * `city` in the field `address`.
+   * `\`*\`` represents a field named `*`, not any field.
+   * A special `Field` contains the default indexing settings for all fields.
+   * This field's resource name is:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+   * Indexes defined on this `Field` will be applied to all fields which do not
+   * have their own `Field` index configuration.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A field name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * A field path may be a simple field name, e.g. `address` or a path to fields
+   * within map_value , e.g. `address.city`,
+   * or a special field path. The only valid special field is `*`, which
+   * represents any field.
+   * Field paths may be quoted using ` (backtick). The only character that needs
+   * to be escaped within a quoted field path is the backtick character itself,
+   * escaped using a backslash. Special characters in field paths that
+   * must be quoted include: `*`, `.`,
+   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * Examples:
+   * (Note: Comments here are written in markdown syntax, so there is an
+   *  additional layer of backticks to represent a code block)
+   * `\`address.city\`` represents a field named `address.city`, not the map key
+   * `city` in the field `address`.
+   * `\`*\`` represents a field named `*`, not any field.
+   * A special `Field` contains the default indexing settings for all fields.
+   * This field's resource name is:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+   * Indexes defined on this `Field` will be applied to all fields which do not
+   * have their own `Field` index configuration.
+   * 
+ * + * 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 INDEX_CONFIG_FIELD_NUMBER = 2; + private com.google.firestore.admin.v1.Field.IndexConfig indexConfig_; + /** + * + * + *
+   * The index configuration for this field. If unset, field indexing will
+   * revert to the configuration defined by the `ancestor_field`. To
+   * explicitly remove all indexes for this field, specify an index config
+   * with an empty list of indexes.
+   * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public boolean hasIndexConfig() { + return indexConfig_ != null; + } + /** + * + * + *
+   * The index configuration for this field. If unset, field indexing will
+   * revert to the configuration defined by the `ancestor_field`. To
+   * explicitly remove all indexes for this field, specify an index config
+   * with an empty list of indexes.
+   * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig() { + return indexConfig_ == null + ? com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance() + : indexConfig_; + } + /** + * + * + *
+   * The index configuration for this field. If unset, field indexing will
+   * revert to the configuration defined by the `ancestor_field`. To
+   * explicitly remove all indexes for this field, specify an index config
+   * with an empty list of indexes.
+   * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOrBuilder() { + return getIndexConfig(); + } + + 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 (indexConfig_ != null) { + output.writeMessage(2, getIndexConfig()); + } + 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 (indexConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIndexConfig()); + } + 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.admin.v1.Field)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Field other = (com.google.firestore.admin.v1.Field) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + result = result && (hasIndexConfig() == other.hasIndexConfig()); + if (hasIndexConfig()) { + result = result && getIndexConfig().equals(other.getIndexConfig()); + } + 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 (hasIndexConfig()) { + hash = (37 * hash) + INDEX_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIndexConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Field parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Field 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.admin.v1.Field parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Field 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.admin.v1.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Field parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Field parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Field parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Field parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.admin.v1.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a single field in the database.
+   * Fields are grouped by their "Collection Group", which represent all
+   * collections in the database with the same id.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Field} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Field) + com.google.firestore.admin.v1.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Field.class, + com.google.firestore.admin.v1.Field.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (indexConfigBuilder_ == null) { + indexConfig_ = null; + } else { + indexConfig_ = null; + indexConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FieldProto + .internal_static_google_firestore_admin_v1_Field_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Field.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field build() { + com.google.firestore.admin.v1.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field buildPartial() { + com.google.firestore.admin.v1.Field result = new com.google.firestore.admin.v1.Field(this); + result.name_ = name_; + if (indexConfigBuilder_ == null) { + result.indexConfig_ = indexConfig_; + } else { + result.indexConfig_ = indexConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Field) { + return mergeFrom((com.google.firestore.admin.v1.Field) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Field other) { + if (other == com.google.firestore.admin.v1.Field.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasIndexConfig()) { + mergeIndexConfig(other.getIndexConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.Field) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A field name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * A field path may be a simple field name, e.g. `address` or a path to fields
+     * within map_value , e.g. `address.city`,
+     * or a special field path. The only valid special field is `*`, which
+     * represents any field.
+     * Field paths may be quoted using ` (backtick). The only character that needs
+     * to be escaped within a quoted field path is the backtick character itself,
+     * escaped using a backslash. Special characters in field paths that
+     * must be quoted include: `*`, `.`,
+     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * Examples:
+     * (Note: Comments here are written in markdown syntax, so there is an
+     *  additional layer of backticks to represent a code block)
+     * `\`address.city\`` represents a field named `address.city`, not the map key
+     * `city` in the field `address`.
+     * `\`*\`` represents a field named `*`, not any field.
+     * A special `Field` contains the default indexing settings for all fields.
+     * This field's resource name is:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+     * Indexes defined on this `Field` will be applied to all fields which do not
+     * have their own `Field` index configuration.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A field name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * A field path may be a simple field name, e.g. `address` or a path to fields
+     * within map_value , e.g. `address.city`,
+     * or a special field path. The only valid special field is `*`, which
+     * represents any field.
+     * Field paths may be quoted using ` (backtick). The only character that needs
+     * to be escaped within a quoted field path is the backtick character itself,
+     * escaped using a backslash. Special characters in field paths that
+     * must be quoted include: `*`, `.`,
+     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * Examples:
+     * (Note: Comments here are written in markdown syntax, so there is an
+     *  additional layer of backticks to represent a code block)
+     * `\`address.city\`` represents a field named `address.city`, not the map key
+     * `city` in the field `address`.
+     * `\`*\`` represents a field named `*`, not any field.
+     * A special `Field` contains the default indexing settings for all fields.
+     * This field's resource name is:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+     * Indexes defined on this `Field` will be applied to all fields which do not
+     * have their own `Field` index configuration.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A field name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * A field path may be a simple field name, e.g. `address` or a path to fields
+     * within map_value , e.g. `address.city`,
+     * or a special field path. The only valid special field is `*`, which
+     * represents any field.
+     * Field paths may be quoted using ` (backtick). The only character that needs
+     * to be escaped within a quoted field path is the backtick character itself,
+     * escaped using a backslash. Special characters in field paths that
+     * must be quoted include: `*`, `.`,
+     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * Examples:
+     * (Note: Comments here are written in markdown syntax, so there is an
+     *  additional layer of backticks to represent a code block)
+     * `\`address.city\`` represents a field named `address.city`, not the map key
+     * `city` in the field `address`.
+     * `\`*\`` represents a field named `*`, not any field.
+     * A special `Field` contains the default indexing settings for all fields.
+     * This field's resource name is:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+     * Indexes defined on this `Field` will be applied to all fields which do not
+     * have their own `Field` index configuration.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A field name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * A field path may be a simple field name, e.g. `address` or a path to fields
+     * within map_value , e.g. `address.city`,
+     * or a special field path. The only valid special field is `*`, which
+     * represents any field.
+     * Field paths may be quoted using ` (backtick). The only character that needs
+     * to be escaped within a quoted field path is the backtick character itself,
+     * escaped using a backslash. Special characters in field paths that
+     * must be quoted include: `*`, `.`,
+     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * Examples:
+     * (Note: Comments here are written in markdown syntax, so there is an
+     *  additional layer of backticks to represent a code block)
+     * `\`address.city\`` represents a field named `address.city`, not the map key
+     * `city` in the field `address`.
+     * `\`*\`` represents a field named `*`, not any field.
+     * A special `Field` contains the default indexing settings for all fields.
+     * This field's resource name is:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+     * Indexes defined on this `Field` will be applied to all fields which do not
+     * have their own `Field` index configuration.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A field name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * A field path may be a simple field name, e.g. `address` or a path to fields
+     * within map_value , e.g. `address.city`,
+     * or a special field path. The only valid special field is `*`, which
+     * represents any field.
+     * Field paths may be quoted using ` (backtick). The only character that needs
+     * to be escaped within a quoted field path is the backtick character itself,
+     * escaped using a backslash. Special characters in field paths that
+     * must be quoted include: `*`, `.`,
+     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * Examples:
+     * (Note: Comments here are written in markdown syntax, so there is an
+     *  additional layer of backticks to represent a code block)
+     * `\`address.city\`` represents a field named `address.city`, not the map key
+     * `city` in the field `address`.
+     * `\`*\`` represents a field named `*`, not any field.
+     * A special `Field` contains the default indexing settings for all fields.
+     * This field's resource name is:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+     * Indexes defined on this `Field` will be applied to all fields which do not
+     * have their own `Field` index configuration.
+     * 
+ * + * 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.admin.v1.Field.IndexConfig indexConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Field.IndexConfig, + com.google.firestore.admin.v1.Field.IndexConfig.Builder, + com.google.firestore.admin.v1.Field.IndexConfigOrBuilder> + indexConfigBuilder_; + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public boolean hasIndexConfig() { + return indexConfigBuilder_ != null || indexConfig_ != null; + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig() { + if (indexConfigBuilder_ == null) { + return indexConfig_ == null + ? com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance() + : indexConfig_; + } else { + return indexConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public Builder setIndexConfig(com.google.firestore.admin.v1.Field.IndexConfig value) { + if (indexConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexConfig_ = value; + onChanged(); + } else { + indexConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public Builder setIndexConfig( + com.google.firestore.admin.v1.Field.IndexConfig.Builder builderForValue) { + if (indexConfigBuilder_ == null) { + indexConfig_ = builderForValue.build(); + onChanged(); + } else { + indexConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public Builder mergeIndexConfig(com.google.firestore.admin.v1.Field.IndexConfig value) { + if (indexConfigBuilder_ == null) { + if (indexConfig_ != null) { + indexConfig_ = + com.google.firestore.admin.v1.Field.IndexConfig.newBuilder(indexConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + indexConfig_ = value; + } + onChanged(); + } else { + indexConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public Builder clearIndexConfig() { + if (indexConfigBuilder_ == null) { + indexConfig_ = null; + onChanged(); + } else { + indexConfig_ = null; + indexConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public com.google.firestore.admin.v1.Field.IndexConfig.Builder getIndexConfigBuilder() { + + onChanged(); + return getIndexConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOrBuilder() { + if (indexConfigBuilder_ != null) { + return indexConfigBuilder_.getMessageOrBuilder(); + } else { + return indexConfig_ == null + ? com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance() + : indexConfig_; + } + } + /** + * + * + *
+     * The index configuration for this field. If unset, field indexing will
+     * revert to the configuration defined by the `ancestor_field`. To
+     * explicitly remove all indexes for this field, specify an index config
+     * with an empty list of indexes.
+     * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Field.IndexConfig, + com.google.firestore.admin.v1.Field.IndexConfig.Builder, + com.google.firestore.admin.v1.Field.IndexConfigOrBuilder> + getIndexConfigFieldBuilder() { + if (indexConfigBuilder_ == null) { + indexConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Field.IndexConfig, + com.google.firestore.admin.v1.Field.IndexConfig.Builder, + com.google.firestore.admin.v1.Field.IndexConfigOrBuilder>( + getIndexConfig(), getParentForChildren(), isClean()); + indexConfig_ = null; + } + return indexConfigBuilder_; + } + + @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.admin.v1.Field) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Field) + private static final com.google.firestore.admin.v1.Field DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Field(); + } + + public static com.google.firestore.admin.v1.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Field(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java new file mode 100644 index 000000000000..dd2b2e9f7d58 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java @@ -0,0 +1,248 @@ +/* + * 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.admin.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 FieldName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String database; + private final String collectionId; + private final String fieldId; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getCollectionId() { + return collectionId; + } + + public String getFieldId() { + return fieldId; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private FieldName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + database = Preconditions.checkNotNull(builder.getDatabase()); + collectionId = Preconditions.checkNotNull(builder.getCollectionId()); + fieldId = Preconditions.checkNotNull(builder.getFieldId()); + } + + public static FieldName of(String project, String database, String collectionId, String fieldId) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setCollectionId(collectionId) + .setFieldId(fieldId) + .build(); + } + + public static String format( + String project, String database, String collectionId, String fieldId) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setCollectionId(collectionId) + .setFieldId(fieldId) + .build() + .toString(); + } + + public static FieldName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "FieldName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("database"), + matchMap.get("collection_id"), + matchMap.get("field_id")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (FieldName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("database", database); + fieldMapBuilder.put("collectionId", collectionId); + fieldMapBuilder.put("fieldId", fieldId); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "database", + database, + "collection_id", + collectionId, + "field_id", + fieldId); + } + + /** Builder for FieldName. */ + public static class Builder { + + private String project; + private String database; + private String collectionId; + private String fieldId; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getCollectionId() { + return collectionId; + } + + public String getFieldId() { + return fieldId; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDatabase(String database) { + this.database = database; + return this; + } + + public Builder setCollectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + + public Builder setFieldId(String fieldId) { + this.fieldId = fieldId; + return this; + } + + private Builder() {} + + private Builder(FieldName fieldName) { + project = fieldName.project; + database = fieldName.database; + collectionId = fieldName.collectionId; + fieldId = fieldName.fieldId; + } + + public FieldName build() { + return new FieldName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof FieldName) { + FieldName that = (FieldName) o; + return (this.project.equals(that.project)) + && (this.database.equals(that.database)) + && (this.collectionId.equals(that.collectionId)) + && (this.fieldId.equals(that.fieldId)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= database.hashCode(); + h *= 1000003; + h ^= collectionId.hashCode(); + h *= 1000003; + h ^= fieldId.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java new file mode 100644 index 000000000000..1f1237648846 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java @@ -0,0 +1,3483 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+ * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.FieldOperationMetadata} + */ +public final class FieldOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.FieldOperationMetadata) + FieldOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldOperationMetadata.newBuilder() to construct. + private FieldOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FieldOperationMetadata() { + field_ = ""; + indexConfigDeltas_ = java.util.Collections.emptyList(); + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FieldOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + field_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + indexConfigDeltas_ = + new java.util.ArrayList< + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta>(); + mutable_bitField0_ |= 0x00000008; + } + indexConfigDeltas_.add( + input.readMessage( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + .parser(), + extensionRegistry)); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 50: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressDocuments_ != null) { + subBuilder = progressDocuments_.toBuilder(); + } + progressDocuments_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressDocuments_); + progressDocuments_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressBytes_ != null) { + subBuilder = progressBytes_.toBuilder(); + } + progressBytes_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressBytes_); + progressBytes_ = 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 { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + indexConfigDeltas_ = java.util.Collections.unmodifiableList(indexConfigDeltas_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.FieldOperationMetadata.class, + com.google.firestore.admin.v1.FieldOperationMetadata.Builder.class); + } + + public interface IndexConfigDeltaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Specifies how the index is changing.
+     * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + int getChangeTypeValue(); + /** + * + * + *
+     * Specifies how the index is changing.
+     * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + getChangeType(); + + /** + * + * + *
+     * The index being changed.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + boolean hasIndex(); + /** + * + * + *
+     * The index being changed.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + com.google.firestore.admin.v1.Index getIndex(); + /** + * + * + *
+     * The index being changed.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder(); + } + /** + * + * + *
+   * Information about an index configuration change.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta} + */ + public static final class IndexConfigDelta extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) + IndexConfigDeltaOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexConfigDelta.newBuilder() to construct. + private IndexConfigDelta(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexConfigDelta() { + changeType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexConfigDelta( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + changeType_ = rawValue; + break; + } + case 18: + { + com.google.firestore.admin.v1.Index.Builder subBuilder = null; + if (index_ != null) { + subBuilder = index_.toBuilder(); + } + index_ = + input.readMessage( + com.google.firestore.admin.v1.Index.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(index_); + index_ = 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.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.class, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder.class); + } + + /** + * + * + *
+     * Specifies how the index is changing.
+     * 
+ * + * Protobuf enum {@code + * google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType} + */ + public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The type of change is not specified or known.
+       * 
+ * + * CHANGE_TYPE_UNSPECIFIED = 0; + */ + CHANGE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * The single field index is being added.
+       * 
+ * + * ADD = 1; + */ + ADD(1), + /** + * + * + *
+       * The single field index is being removed.
+       * 
+ * + * REMOVE = 2; + */ + REMOVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The type of change is not specified or known.
+       * 
+ * + * CHANGE_TYPE_UNSPECIFIED = 0; + */ + public static final int CHANGE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The single field index is being added.
+       * 
+ * + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * + * + *
+       * The single field index is being removed.
+       * 
+ * + * REMOVE = 2; + */ + public static final int REMOVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ChangeType valueOf(int value) { + return forNumber(value); + } + + public static ChangeType forNumber(int value) { + switch (value) { + case 0: + return CHANGE_TYPE_UNSPECIFIED; + case 1: + return ADD; + case 2: + return REMOVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ChangeType findValueByNumber(int number) { + return ChangeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ChangeType[] VALUES = values(); + + public static ChangeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ChangeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType) + } + + public static final int CHANGE_TYPE_FIELD_NUMBER = 1; + private int changeType_; + /** + * + * + *
+     * Specifies how the index is changing.
+     * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public int getChangeTypeValue() { + return changeType_; + } + /** + * + * + *
+     * Specifies how the index is changing.
+     * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + getChangeType() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType result = + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType.valueOf( + changeType_); + return result == null + ? com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + .UNRECOGNIZED + : result; + } + + public static final int INDEX_FIELD_NUMBER = 2; + private com.google.firestore.admin.v1.Index index_; + /** + * + * + *
+     * The index being changed.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public boolean hasIndex() { + return index_ != null; + } + /** + * + * + *
+     * The index being changed.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.Index getIndex() { + return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; + } + /** + * + * + *
+     * The index being changed.
+     * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { + return getIndex(); + } + + 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 (changeType_ + != com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + .CHANGE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, changeType_); + } + if (index_ != null) { + output.writeMessage(2, getIndex()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (changeType_ + != com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + .CHANGE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, changeType_); + } + if (index_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIndex()); + } + 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.admin.v1.FieldOperationMetadata.IndexConfigDelta)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta other = + (com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) obj; + + boolean result = true; + result = result && changeType_ == other.changeType_; + result = result && (hasIndex() == other.hasIndex()); + if (hasIndex()) { + result = result && getIndex().equals(other.getIndex()); + } + 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) + CHANGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + changeType_; + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta 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.admin.v1.FieldOperationMetadata.IndexConfigDelta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta 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.admin.v1.FieldOperationMetadata.IndexConfigDelta parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta 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.admin.v1.FieldOperationMetadata.IndexConfigDelta + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + 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.admin.v1.FieldOperationMetadata.IndexConfigDelta parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta 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.admin.v1.FieldOperationMetadata.IndexConfigDelta 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; + } + /** + * + * + *
+     * Information about an index configuration change.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.class, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + .class); + } + + // Construct using + // com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + changeType_ = 0; + + if (indexBuilder_ == null) { + index_ = null; + } else { + index_ = null; + indexBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + getDefaultInstanceForType() { + return com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta build() { + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta buildPartial() { + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta result = + new com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta(this); + result.changeType_ = changeType_; + if (indexBuilder_ == null) { + result.index_ = index_; + } else { + result.index_ = indexBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) { + return mergeFrom( + (com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta other) { + if (other + == com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + .getDefaultInstance()) return this; + if (other.changeType_ != 0) { + setChangeTypeValue(other.getChangeTypeValue()); + } + if (other.hasIndex()) { + mergeIndex(other.getIndex()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int changeType_ = 0; + /** + * + * + *
+       * Specifies how the index is changing.
+       * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public int getChangeTypeValue() { + return changeType_; + } + /** + * + * + *
+       * Specifies how the index is changing.
+       * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public Builder setChangeTypeValue(int value) { + changeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies how the index is changing.
+       * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + getChangeType() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType result = + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + .valueOf(changeType_); + return result == null + ? com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Specifies how the index is changing.
+       * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public Builder setChangeType( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType value) { + if (value == null) { + throw new NullPointerException(); + } + + changeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies how the index is changing.
+       * 
+ * + * + * .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * + */ + public Builder clearChangeType() { + + changeType_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.Index index_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + indexBuilder_; + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public boolean hasIndex() { + return indexBuilder_ != null || index_ != null; + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.Index getIndex() { + if (indexBuilder_ == null) { + return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; + } else { + return indexBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder setIndex(com.google.firestore.admin.v1.Index value) { + if (indexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + onChanged(); + } else { + indexBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder setIndex(com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexBuilder_ == null) { + index_ = builderForValue.build(); + onChanged(); + } else { + indexBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder mergeIndex(com.google.firestore.admin.v1.Index value) { + if (indexBuilder_ == null) { + if (index_ != null) { + index_ = + com.google.firestore.admin.v1.Index.newBuilder(index_) + .mergeFrom(value) + .buildPartial(); + } else { + index_ = value; + } + onChanged(); + } else { + indexBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public Builder clearIndex() { + if (indexBuilder_ == null) { + index_ = null; + onChanged(); + } else { + index_ = null; + indexBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.Index.Builder getIndexBuilder() { + + onChanged(); + return getIndexFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { + if (indexBuilder_ != null) { + return indexBuilder_.getMessageOrBuilder(); + } else { + return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; + } + } + /** + * + * + *
+       * The index being changed.
+       * 
+ * + * .google.firestore.admin.v1.Index index = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + getIndexFieldBuilder() { + if (indexBuilder_ == null) { + indexBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder>( + getIndex(), getParentForChildren(), isClean()); + index_ = null; + } + return indexBuilder_; + } + + @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.admin.v1.FieldOperationMetadata.IndexConfigDelta) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) + private static final com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta(); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexConfigDelta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexConfigDelta(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int FIELD_FIELD_NUMBER = 3; + private volatile java.lang.Object field_; + /** + * + * + *
+   * The field resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * 
+ * + * string field = 3; + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + * + * + *
+   * The field resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * 
+ * + * string field = 3; + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_CONFIG_DELTAS_FIELD_NUMBER = 4; + private java.util.List + indexConfigDeltas_; + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public java.util.List + getIndexConfigDeltasList() { + return indexConfigDeltas_; + } + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public java.util.List< + ? extends com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> + getIndexConfigDeltasOrBuilderList() { + return indexConfigDeltas_; + } + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public int getIndexConfigDeltasCount() { + return indexConfigDeltas_.size(); + } + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexConfigDeltas( + int index) { + return indexConfigDeltas_.get(index); + } + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder + getIndexConfigDeltasOrBuilder(int index) { + return indexConfigDeltas_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_; + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public com.google.firestore.admin.v1.OperationState getState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(state_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 6; + private com.google.firestore.admin.v1.Progress progressDocuments_; + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public boolean hasProgressDocuments() { + return progressDocuments_ != null; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + return getProgressDocuments(); + } + + public static final int PROGRESS_BYTES_FIELD_NUMBER = 7; + private com.google.firestore.admin.v1.Progress progressBytes_; + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public boolean hasProgressBytes() { + return progressBytes_ != null; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + return getProgressBytes(); + } + + 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 (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getFieldBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, field_); + } + for (int i = 0; i < indexConfigDeltas_.size(); i++) { + output.writeMessage(4, indexConfigDeltas_.get(i)); + } + if (state_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (progressDocuments_ != null) { + output.writeMessage(6, getProgressDocuments()); + } + if (progressBytes_ != null) { + output.writeMessage(7, getProgressBytes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getFieldBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, field_); + } + for (int i = 0; i < indexConfigDeltas_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, indexConfigDeltas_.get(i)); + } + if (state_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (progressDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProgressDocuments()); + } + if (progressBytes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProgressBytes()); + } + 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.admin.v1.FieldOperationMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.FieldOperationMetadata other = + (com.google.firestore.admin.v1.FieldOperationMetadata) obj; + + boolean result = true; + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && getStartTime().equals(other.getStartTime()); + } + result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime()) { + result = result && getEndTime().equals(other.getEndTime()); + } + result = result && getField().equals(other.getField()); + result = result && getIndexConfigDeltasList().equals(other.getIndexConfigDeltasList()); + result = result && state_ == other.state_; + result = result && (hasProgressDocuments() == other.hasProgressDocuments()); + if (hasProgressDocuments()) { + result = result && getProgressDocuments().equals(other.getProgressDocuments()); + } + result = result && (hasProgressBytes() == other.hasProgressBytes()); + if (hasProgressBytes()) { + result = result && getProgressBytes().equals(other.getProgressBytes()); + } + 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + if (getIndexConfigDeltasCount() > 0) { + hash = (37 * hash) + INDEX_CONFIG_DELTAS_FIELD_NUMBER; + hash = (53 * hash) + getIndexConfigDeltasList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasProgressDocuments()) { + hash = (37 * hash) + PROGRESS_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getProgressDocuments().hashCode(); + } + if (hasProgressBytes()) { + hash = (37 * hash) + PROGRESS_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProgressBytes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata 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.admin.v1.FieldOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata 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.admin.v1.FieldOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata 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.admin.v1.FieldOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata 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.admin.v1.FieldOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata 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.admin.v1.FieldOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+   * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.FieldOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.FieldOperationMetadata) + com.google.firestore.admin.v1.FieldOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.FieldOperationMetadata.class, + com.google.firestore.admin.v1.FieldOperationMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.FieldOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIndexConfigDeltasFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + field_ = ""; + + if (indexConfigDeltasBuilder_ == null) { + indexConfigDeltas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + indexConfigDeltasBuilder_.clear(); + } + state_ = 0; + + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.FieldOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata build() { + com.google.firestore.admin.v1.FieldOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata buildPartial() { + com.google.firestore.admin.v1.FieldOperationMetadata result = + new com.google.firestore.admin.v1.FieldOperationMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.field_ = field_; + if (indexConfigDeltasBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + indexConfigDeltas_ = java.util.Collections.unmodifiableList(indexConfigDeltas_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.indexConfigDeltas_ = indexConfigDeltas_; + } else { + result.indexConfigDeltas_ = indexConfigDeltasBuilder_.build(); + } + result.state_ = state_; + if (progressDocumentsBuilder_ == null) { + result.progressDocuments_ = progressDocuments_; + } else { + result.progressDocuments_ = progressDocumentsBuilder_.build(); + } + if (progressBytesBuilder_ == null) { + result.progressBytes_ = progressBytes_; + } else { + result.progressBytes_ = progressBytesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.FieldOperationMetadata) { + return mergeFrom((com.google.firestore.admin.v1.FieldOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.FieldOperationMetadata other) { + if (other == com.google.firestore.admin.v1.FieldOperationMetadata.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getField().isEmpty()) { + field_ = other.field_; + onChanged(); + } + if (indexConfigDeltasBuilder_ == null) { + if (!other.indexConfigDeltas_.isEmpty()) { + if (indexConfigDeltas_.isEmpty()) { + indexConfigDeltas_ = other.indexConfigDeltas_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.addAll(other.indexConfigDeltas_); + } + onChanged(); + } + } else { + if (!other.indexConfigDeltas_.isEmpty()) { + if (indexConfigDeltasBuilder_.isEmpty()) { + indexConfigDeltasBuilder_.dispose(); + indexConfigDeltasBuilder_ = null; + indexConfigDeltas_ = other.indexConfigDeltas_; + bitField0_ = (bitField0_ & ~0x00000008); + indexConfigDeltasBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndexConfigDeltasFieldBuilder() + : null; + } else { + indexConfigDeltasBuilder_.addAllMessages(other.indexConfigDeltas_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasProgressDocuments()) { + mergeProgressDocuments(other.getProgressDocuments()); + } + if (other.hasProgressBytes()) { + mergeProgressBytes(other.getProgressBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.FieldOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.FieldOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object field_ = ""; + /** + * + * + *
+     * The field resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * 
+ * + * string field = 3; + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The field resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * 
+ * + * string field = 3; + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The field resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * 
+ * + * string field = 3; + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The field resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * 
+ * + * string field = 3; + */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + * + * + *
+     * The field resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+     * 
+ * + * string field = 3; + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + field_ = value; + onChanged(); + return this; + } + + private java.util.List + indexConfigDeltas_ = java.util.Collections.emptyList(); + + private void ensureIndexConfigDeltasIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + indexConfigDeltas_ = + new java.util.ArrayList< + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta>( + indexConfigDeltas_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> + indexConfigDeltasBuilder_; + + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public java.util.List + getIndexConfigDeltasList() { + if (indexConfigDeltasBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexConfigDeltas_); + } else { + return indexConfigDeltasBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public int getIndexConfigDeltasCount() { + if (indexConfigDeltasBuilder_ == null) { + return indexConfigDeltas_.size(); + } else { + return indexConfigDeltasBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + getIndexConfigDeltas(int index) { + if (indexConfigDeltasBuilder_ == null) { + return indexConfigDeltas_.get(index); + } else { + return indexConfigDeltasBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder setIndexConfigDeltas( + int index, com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta value) { + if (indexConfigDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.set(index, value); + onChanged(); + } else { + indexConfigDeltasBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder setIndexConfigDeltas( + int index, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + builderForValue) { + if (indexConfigDeltasBuilder_ == null) { + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.set(index, builderForValue.build()); + onChanged(); + } else { + indexConfigDeltasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder addIndexConfigDeltas( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta value) { + if (indexConfigDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.add(value); + onChanged(); + } else { + indexConfigDeltasBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder addIndexConfigDeltas( + int index, com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta value) { + if (indexConfigDeltasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.add(index, value); + onChanged(); + } else { + indexConfigDeltasBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder addIndexConfigDeltas( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + builderForValue) { + if (indexConfigDeltasBuilder_ == null) { + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.add(builderForValue.build()); + onChanged(); + } else { + indexConfigDeltasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder addIndexConfigDeltas( + int index, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + builderForValue) { + if (indexConfigDeltasBuilder_ == null) { + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.add(index, builderForValue.build()); + onChanged(); + } else { + indexConfigDeltasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder addAllIndexConfigDeltas( + java.lang.Iterable< + ? extends com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta> + values) { + if (indexConfigDeltasBuilder_ == null) { + ensureIndexConfigDeltasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexConfigDeltas_); + onChanged(); + } else { + indexConfigDeltasBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder clearIndexConfigDeltas() { + if (indexConfigDeltasBuilder_ == null) { + indexConfigDeltas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + indexConfigDeltasBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public Builder removeIndexConfigDeltas(int index) { + if (indexConfigDeltasBuilder_ == null) { + ensureIndexConfigDeltasIsMutable(); + indexConfigDeltas_.remove(index); + onChanged(); + } else { + indexConfigDeltasBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + getIndexConfigDeltasBuilder(int index) { + return getIndexConfigDeltasFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder + getIndexConfigDeltasOrBuilder(int index) { + if (indexConfigDeltasBuilder_ == null) { + return indexConfigDeltas_.get(index); + } else { + return indexConfigDeltasBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public java.util.List< + ? extends + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> + getIndexConfigDeltasOrBuilderList() { + if (indexConfigDeltasBuilder_ != null) { + return indexConfigDeltasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexConfigDeltas_); + } + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + addIndexConfigDeltasBuilder() { + return getIndexConfigDeltasFieldBuilder() + .addBuilder( + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder + addIndexConfigDeltasBuilder(int index) { + return getIndexConfigDeltasFieldBuilder() + .addBuilder( + index, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+     * operation.
+     * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + public java.util.List< + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder> + getIndexConfigDeltasBuilderList() { + return getIndexConfigDeltasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> + getIndexConfigDeltasFieldBuilder() { + if (indexConfigDeltasBuilder_ == null) { + indexConfigDeltasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.Builder, + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder>( + indexConfigDeltas_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + indexConfigDeltas_ = null; + } + return indexConfigDeltasBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public com.google.firestore.admin.v1.OperationState getState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(state_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public Builder setState(com.google.firestore.admin.v1.OperationState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.Progress progressDocuments_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressDocumentsBuilder_; + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public boolean hasProgressDocuments() { + return progressDocumentsBuilder_ != null || progressDocuments_ != null; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } else { + return progressDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressDocuments_ = value; + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public Builder setProgressDocuments( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = builderForValue.build(); + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (progressDocuments_ != null) { + progressDocuments_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + progressDocuments_ = value; + } + onChanged(); + } else { + progressDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public Builder clearProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + onChanged(); + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilder() { + + onChanged(); + return getProgressDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + if (progressDocumentsBuilder_ != null) { + return progressDocumentsBuilder_.getMessageOrBuilder(); + } else { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressDocumentsFieldBuilder() { + if (progressDocumentsBuilder_ == null) { + progressDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressDocuments(), getParentForChildren(), isClean()); + progressDocuments_ = null; + } + return progressDocumentsBuilder_; + } + + private com.google.firestore.admin.v1.Progress progressBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressBytesBuilder_; + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public boolean hasProgressBytes() { + return progressBytesBuilder_ != null || progressBytes_ != null; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + if (progressBytesBuilder_ == null) { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } else { + return progressBytesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressBytes_ = value; + onChanged(); + } else { + progressBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public Builder setProgressBytes( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressBytesBuilder_ == null) { + progressBytes_ = builderForValue.build(); + onChanged(); + } else { + progressBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (progressBytes_ != null) { + progressBytes_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressBytes_) + .mergeFrom(value) + .buildPartial(); + } else { + progressBytes_ = value; + } + onChanged(); + } else { + progressBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public Builder clearProgressBytes() { + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + onChanged(); + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() { + + onChanged(); + return getProgressBytesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + if (progressBytesBuilder_ != null) { + return progressBytesBuilder_.getMessageOrBuilder(); + } else { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressBytesFieldBuilder() { + if (progressBytesBuilder_ == null) { + progressBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressBytes(), getParentForChildren(), isClean()); + progressBytes_ = null; + } + return progressBytesBuilder_; + } + + @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.admin.v1.FieldOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.FieldOperationMetadata) + private static final com.google.firestore.admin.v1.FieldOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.FieldOperationMetadata(); + } + + public static com.google.firestore.admin.v1.FieldOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FieldOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.FieldOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..3221c865649e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadataOrBuilder.java @@ -0,0 +1,252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public interface FieldOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.FieldOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The field resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * 
+ * + * string field = 3; + */ + java.lang.String getField(); + /** + * + * + *
+   * The field resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * 
+ * + * string field = 3; + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + java.util.List + getIndexConfigDeltasList(); + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexConfigDeltas( + int index); + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + int getIndexConfigDeltasCount(); + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + java.util.List< + ? extends com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> + getIndexConfigDeltasOrBuilderList(); + /** + * + * + *
+   * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
+   * operation.
+   * 
+ * + * + * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * + */ + com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder + getIndexConfigDeltasOrBuilder(int index); + + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + int getStateValue(); + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 5; + */ + com.google.firestore.admin.v1.OperationState getState(); + + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + boolean hasProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 6; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder(); + + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + boolean hasProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + com.google.firestore.admin.v1.Progress getProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java new file mode 100644 index 000000000000..117cfa5a0db1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java @@ -0,0 +1,113 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/field.proto + +package com.google.firestore.admin.v1; + +public interface FieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A field name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * A field path may be a simple field name, e.g. `address` or a path to fields
+   * within map_value , e.g. `address.city`,
+   * or a special field path. The only valid special field is `*`, which
+   * represents any field.
+   * Field paths may be quoted using ` (backtick). The only character that needs
+   * to be escaped within a quoted field path is the backtick character itself,
+   * escaped using a backslash. Special characters in field paths that
+   * must be quoted include: `*`, `.`,
+   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * Examples:
+   * (Note: Comments here are written in markdown syntax, so there is an
+   *  additional layer of backticks to represent a code block)
+   * `\`address.city\`` represents a field named `address.city`, not the map key
+   * `city` in the field `address`.
+   * `\`*\`` represents a field named `*`, not any field.
+   * A special `Field` contains the default indexing settings for all fields.
+   * This field's resource name is:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+   * Indexes defined on this `Field` will be applied to all fields which do not
+   * have their own `Field` index configuration.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * A field name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
+   * A field path may be a simple field name, e.g. `address` or a path to fields
+   * within map_value , e.g. `address.city`,
+   * or a special field path. The only valid special field is `*`, which
+   * represents any field.
+   * Field paths may be quoted using ` (backtick). The only character that needs
+   * to be escaped within a quoted field path is the backtick character itself,
+   * escaped using a backslash. Special characters in field paths that
+   * must be quoted include: `*`, `.`,
+   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * Examples:
+   * (Note: Comments here are written in markdown syntax, so there is an
+   *  additional layer of backticks to represent a code block)
+   * `\`address.city\`` represents a field named `address.city`, not the map key
+   * `city` in the field `address`.
+   * `\`*\`` represents a field named `*`, not any field.
+   * A special `Field` contains the default indexing settings for all fields.
+   * This field's resource name is:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
+   * Indexes defined on this `Field` will be applied to all fields which do not
+   * have their own `Field` index configuration.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The index configuration for this field. If unset, field indexing will
+   * revert to the configuration defined by the `ancestor_field`. To
+   * explicitly remove all indexes for this field, specify an index config
+   * with an empty list of indexes.
+   * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + boolean hasIndexConfig(); + /** + * + * + *
+   * The index configuration for this field. If unset, field indexing will
+   * revert to the configuration defined by the `ancestor_field`. To
+   * explicitly remove all indexes for this field, specify an index config
+   * with an empty list of indexes.
+   * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig(); + /** + * + * + *
+   * The index configuration for this field. If unset, field indexing will
+   * revert to the configuration defined by the `ancestor_field`. To
+   * explicitly remove all indexes for this field, specify an index config
+   * with an empty list of indexes.
+   * 
+ * + * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java new file mode 100644 index 000000000000..bb1d6c386ef6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/field.proto + +package com.google.firestore.admin.v1; + +public final class FieldProto { + private FieldProto() {} + + 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_admin_v1_Field_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Field_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Field_IndexConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Field_IndexConfig_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/admin/v1/field.proto\022" + + "\031google.firestore.admin.v1\032%google/fires" + + "tore/admin/v1/index.proto\032\034google/api/an" + + "notations.proto\"\345\001\n\005Field\022\014\n\004name\030\001 \001(\t\022" + + "B\n\014index_config\030\002 \001(\0132,.google.firestore" + + ".admin.v1.Field.IndexConfig\032\211\001\n\013IndexCon" + + "fig\0221\n\007indexes\030\001 \003(\0132 .google.firestore." + + "admin.v1.Index\022\034\n\024uses_ancestor_config\030\002" + + " \001(\010\022\026\n\016ancestor_field\030\003 \001(\t\022\021\n\trevertin" + + "g\030\004 \001(\010B\270\001\n\035com.google.firestore.admin.v" + + "1B\nFieldProtoP\001Z>google.golang.org/genpr" + + "oto/googleapis/firestore/admin/v1;admin\242" + + "\002\004GCFS\252\002\037Google.Cloud.Firestore.Admin.V1" + + "\312\002\037Google\\Cloud\\Firestore\\Admin\\V1b\006prot" + + "o3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.firestore.admin.v1.IndexProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_firestore_admin_v1_Field_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_Field_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Field_descriptor, + new java.lang.String[] { + "Name", "IndexConfig", + }); + internal_static_google_firestore_admin_v1_Field_IndexConfig_descriptor = + internal_static_google_firestore_admin_v1_Field_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_admin_v1_Field_IndexConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Field_IndexConfig_descriptor, + new java.lang.String[] { + "Indexes", "UsesAncestorConfig", "AncestorField", "Reverting", + }); + com.google.firestore.admin.v1.IndexProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java new file mode 100644 index 000000000000..c058711f5eda --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java @@ -0,0 +1,263 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public final class FirestoreAdminProto { + private FirestoreAdminProto() {} + + 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_admin_v1_CreateIndexRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_CreateIndexRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ListIndexesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ListIndexesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_GetIndexRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_DeleteIndexRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_UpdateFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_GetFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ListFieldsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ListFieldsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ExportDocumentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ImportDocumentsRequest_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/admin/v1/firestore_ad" + + "min.proto\022\031google.firestore.admin.v1\032\034go" + + "ogle/api/annotations.proto\032%google/fires" + + "tore/admin/v1/field.proto\032%google/firest" + + "ore/admin/v1/index.proto\032#google/longrun" + + "ning/operations.proto\032\033google/protobuf/e" + + "mpty.proto\032 google/protobuf/field_mask.p" + + "roto\"U\n\022CreateIndexRequest\022\016\n\006parent\030\001 \001" + + "(\t\022/\n\005index\030\002 \001(\0132 .google.firestore.adm" + + "in.v1.Index\"[\n\022ListIndexesRequest\022\016\n\006par" + + "ent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003" + + " \001(\005\022\022\n\npage_token\030\004 \001(\t\"a\n\023ListIndexesR" + + "esponse\0221\n\007indexes\030\001 \003(\0132 .google.firest" + + "ore.admin.v1.Index\022\027\n\017next_page_token\030\002 " + + "\001(\t\"\037\n\017GetIndexRequest\022\014\n\004name\030\001 \001(\t\"\"\n\022" + + "DeleteIndexRequest\022\014\n\004name\030\001 \001(\t\"v\n\022Upda" + + "teFieldRequest\022/\n\005field\030\001 \001(\0132 .google.f" + + "irestore.admin.v1.Field\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask\"\037\n\017GetF" + + "ieldRequest\022\014\n\004name\030\001 \001(\t\"Z\n\021ListFieldsR" + + "equest\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021" + + "\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n" + + "\022ListFieldsResponse\0220\n\006fields\030\001 \003(\0132 .go" + + "ogle.firestore.admin.v1.Field\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\"Y\n\026ExportDocumentsRequest" + + "\022\014\n\004name\030\001 \001(\t\022\026\n\016collection_ids\030\002 \003(\t\022\031" + + "\n\021output_uri_prefix\030\003 \001(\t\"X\n\026ImportDocum" + + "entsRequest\022\014\n\004name\030\001 \001(\t\022\026\n\016collection_" + + "ids\030\002 \003(\t\022\030\n\020input_uri_prefix\030\003 \001(\t2\205\014\n\016" + + "FirestoreAdmin\022\252\001\n\013CreateIndex\022-.google." + + "firestore.admin.v1.CreateIndexRequest\032\035." + + "google.longrunning.Operation\"M\202\323\344\223\002G\">/v" + + "1/{parent=projects/*/databases/*/collect" + + "ionGroups/*}/indexes:\005index\022\264\001\n\013ListInde" + + "xes\022-.google.firestore.admin.v1.ListInde" + + "xesRequest\032..google.firestore.admin.v1.L" + + "istIndexesResponse\"F\202\323\344\223\002@\022>/v1/{parent=" + + "projects/*/databases/*/collectionGroups/" + + "*}/indexes\022\240\001\n\010GetIndex\022*.google.firesto" + + "re.admin.v1.GetIndexRequest\032 .google.fir" + + "estore.admin.v1.Index\"F\202\323\344\223\002@\022>/v1/{name" + + "=projects/*/databases/*/collectionGroups" + + "/*/indexes/*}\022\234\001\n\013DeleteIndex\022-.google.f" + + "irestore.admin.v1.DeleteIndexRequest\032\026.g" + + "oogle.protobuf.Empty\"F\202\323\344\223\002@*>/v1/{name=" + + "projects/*/databases/*/collectionGroups/" + + "*/indexes/*}\022\237\001\n\010GetField\022*.google.fires" + + "tore.admin.v1.GetFieldRequest\032 .google.f" + + "irestore.admin.v1.Field\"E\202\323\344\223\002?\022=/v1/{na" + + "me=projects/*/databases/*/collectionGrou" + + "ps/*/fields/*}\022\257\001\n\013UpdateField\022-.google." + + "firestore.admin.v1.UpdateFieldRequest\032\035." + + "google.longrunning.Operation\"R\202\323\344\223\002L2C/v" + + "1/{field.name=projects/*/databases/*/col" + + "lectionGroups/*/fields/*}:\005field\022\260\001\n\nLis" + + "tFields\022,.google.firestore.admin.v1.List" + + "FieldsRequest\032-.google.firestore.admin.v" + + "1.ListFieldsResponse\"E\202\323\344\223\002?\022=/v1/{paren" + + "t=projects/*/databases/*/collectionGroup" + + "s/*}/fields\022\241\001\n\017ExportDocuments\0221.google" + + ".firestore.admin.v1.ExportDocumentsReque" + + "st\032\035.google.longrunning.Operation\"<\202\323\344\223\002" + + "6\"1/v1/{name=projects/*/databases/*}:exp" + + "ortDocuments:\001*\022\241\001\n\017ImportDocuments\0221.go" + + "ogle.firestore.admin.v1.ImportDocumentsR" + + "equest\032\035.google.longrunning.Operation\"<\202" + + "\323\344\223\0026\"1/v1/{name=projects/*/databases/*}" + + ":importDocuments:\001*B\301\001\n\035com.google.fires" + + "tore.admin.v1B\023FirestoreAdminProtoP\001Z>go" + + "ogle.golang.org/genproto/googleapis/fire" + + "store/admin/v1;admin\242\002\004GCFS\252\002\037Google.Clo" + + "ud.Firestore.Admin.V1\312\002\037Google\\Cloud\\Fir" + + "estore\\Admin\\V1b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.firestore.admin.v1.FieldProto.getDescriptor(), + com.google.firestore.admin.v1.IndexProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }, + assigner); + internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_CreateIndexRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor, + new java.lang.String[] { + "Parent", "Index", + }); + internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_firestore_admin_v1_ListIndexesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_firestore_admin_v1_ListIndexesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor, + new java.lang.String[] { + "Indexes", "NextPageToken", + }); + internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_firestore_admin_v1_GetIndexRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_firestore_admin_v1_DeleteIndexRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_DeleteIndexRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_firestore_admin_v1_UpdateFieldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor, + new java.lang.String[] { + "Field", "UpdateMask", + }); + internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_firestore_admin_v1_GetFieldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_firestore_admin_v1_ListFieldsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_firestore_admin_v1_ListFieldsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor, + new java.lang.String[] { + "Fields", "NextPageToken", + }); + internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_firestore_admin_v1_ExportDocumentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ExportDocumentsRequest_descriptor, + new java.lang.String[] { + "Name", "CollectionIds", "OutputUriPrefix", + }); + internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_firestore_admin_v1_ImportDocumentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor, + new java.lang.String[] { + "Name", "CollectionIds", "InputUriPrefix", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.firestore.admin.v1.FieldProto.getDescriptor(); + com.google.firestore.admin.v1.IndexProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java new file mode 100644 index 000000000000..22c24383e2b6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java @@ -0,0 +1,604 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.GetFieldRequest} + */ +public final class GetFieldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetFieldRequest) + GetFieldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFieldRequest.newBuilder() to construct. + private GetFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFieldRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetFieldRequest( + 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; + } + 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.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.GetFieldRequest.class, + com.google.firestore.admin.v1.GetFieldRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.admin.v1.GetFieldRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.GetFieldRequest other = + (com.google.firestore.admin.v1.GetFieldRequest) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + 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(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.GetFieldRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetFieldRequest 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.admin.v1.GetFieldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetFieldRequest 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.admin.v1.GetFieldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetFieldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetFieldRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetFieldRequest 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.admin.v1.GetFieldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetFieldRequest 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.admin.v1.GetFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetFieldRequest 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.admin.v1.GetFieldRequest 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 [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.GetFieldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.GetFieldRequest) + com.google.firestore.admin.v1.GetFieldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.GetFieldRequest.class, + com.google.firestore.admin.v1.GetFieldRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.GetFieldRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetFieldRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetFieldRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.GetFieldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetFieldRequest build() { + com.google.firestore.admin.v1.GetFieldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetFieldRequest buildPartial() { + com.google.firestore.admin.v1.GetFieldRequest result = + new com.google.firestore.admin.v1.GetFieldRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.GetFieldRequest) { + return mergeFrom((com.google.firestore.admin.v1.GetFieldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.GetFieldRequest other) { + if (other == com.google.firestore.admin.v1.GetFieldRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.GetFieldRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.GetFieldRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.admin.v1.GetFieldRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.GetFieldRequest) + private static final com.google.firestore.admin.v1.GetFieldRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.GetFieldRequest(); + } + + public static com.google.firestore.admin.v1.GetFieldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFieldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFieldRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetFieldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java new file mode 100644 index 000000000000..0f49e1030980 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface GetFieldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.GetFieldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java new file mode 100644 index 000000000000..2e318046789e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java @@ -0,0 +1,604 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.GetIndexRequest} + */ +public final class GetIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.GetIndexRequest) + GetIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetIndexRequest.newBuilder() to construct. + private GetIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetIndexRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetIndexRequest( + 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; + } + 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.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.GetIndexRequest.class, + com.google.firestore.admin.v1.GetIndexRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.admin.v1.GetIndexRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.GetIndexRequest other = + (com.google.firestore.admin.v1.GetIndexRequest) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + 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(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.GetIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetIndexRequest 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.admin.v1.GetIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetIndexRequest 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.admin.v1.GetIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.GetIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.GetIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetIndexRequest 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.admin.v1.GetIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetIndexRequest 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.admin.v1.GetIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.GetIndexRequest 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.admin.v1.GetIndexRequest 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 [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.GetIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.GetIndexRequest) + com.google.firestore.admin.v1.GetIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.GetIndexRequest.class, + com.google.firestore.admin.v1.GetIndexRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.GetIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_GetIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetIndexRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.GetIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetIndexRequest build() { + com.google.firestore.admin.v1.GetIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetIndexRequest buildPartial() { + com.google.firestore.admin.v1.GetIndexRequest result = + new com.google.firestore.admin.v1.GetIndexRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.GetIndexRequest) { + return mergeFrom((com.google.firestore.admin.v1.GetIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.GetIndexRequest other) { + if (other == com.google.firestore.admin.v1.GetIndexRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.GetIndexRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.GetIndexRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.admin.v1.GetIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.GetIndexRequest) + private static final com.google.firestore.admin.v1.GetIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.GetIndexRequest(); + } + + public static com.google.firestore.admin.v1.GetIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetIndexRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.GetIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java new file mode 100644 index 000000000000..b01fc7cce544 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface GetIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.GetIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * A name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java new file mode 100644 index 000000000000..9df25955c345 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java @@ -0,0 +1,2040 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+ * [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ImportDocumentsMetadata} + */ +public final class ImportDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ImportDocumentsMetadata) + ImportDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsMetadata.newBuilder() to construct. + private ImportDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsMetadata() { + operationState_ = 0; + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDocumentsMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + operationState_ = rawValue; + break; + } + case 34: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressDocuments_ != null) { + subBuilder = progressDocuments_.toBuilder(); + } + progressDocuments_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressDocuments_); + progressDocuments_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressBytes_ != null) { + subBuilder = progressBytes_.toBuilder(); + } + progressBytes_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressBytes_); + progressBytes_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000020; + } + collectionIds_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUriPrefix_ = 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_ & 0x00000020) == 0x00000020)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ImportDocumentsMetadata.class, + com.google.firestore.admin.v1.ImportDocumentsMetadata.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int OPERATION_STATE_FIELD_NUMBER = 3; + private int operationState_; + /** + * + * + *
+   * The state of the import operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public int getOperationStateValue() { + return operationState_; + } + /** + * + * + *
+   * The state of the import operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public com.google.firestore.admin.v1.OperationState getOperationState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 4; + private com.google.firestore.admin.v1.Progress progressDocuments_; + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public boolean hasProgressDocuments() { + return progressDocuments_ != null; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + return getProgressDocuments(); + } + + public static final int PROGRESS_BYTES_FIELD_NUMBER = 5; + private com.google.firestore.admin.v1.Progress progressBytes_; + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public boolean hasProgressBytes() { + return progressBytes_ != null; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + return getProgressBytes(); + } + + public static final int COLLECTION_IDS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList collectionIds_; + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_; + } + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + + public static final int INPUT_URI_PREFIX_FIELD_NUMBER = 7; + private volatile java.lang.Object inputUriPrefix_; + /** + * + * + *
+   * The location of the documents being imported.
+   * 
+ * + * string input_uri_prefix = 7; + */ + public java.lang.String getInputUriPrefix() { + java.lang.Object ref = inputUriPrefix_; + 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(); + inputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * The location of the documents being imported.
+   * 
+ * + * string input_uri_prefix = 7; + */ + public com.google.protobuf.ByteString getInputUriPrefixBytes() { + java.lang.Object ref = inputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, operationState_); + } + if (progressDocuments_ != null) { + output.writeMessage(4, getProgressDocuments()); + } + if (progressBytes_ != null) { + output.writeMessage(5, getProgressBytes()); + } + for (int i = 0; i < collectionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, collectionIds_.getRaw(i)); + } + if (!getInputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, inputUriPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, operationState_); + } + if (progressDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getProgressDocuments()); + } + if (progressBytes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProgressBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < collectionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(collectionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getCollectionIdsList().size(); + } + if (!getInputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, inputUriPrefix_); + } + 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.admin.v1.ImportDocumentsMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ImportDocumentsMetadata other = + (com.google.firestore.admin.v1.ImportDocumentsMetadata) obj; + + boolean result = true; + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && getStartTime().equals(other.getStartTime()); + } + result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime()) { + result = result && getEndTime().equals(other.getEndTime()); + } + result = result && operationState_ == other.operationState_; + result = result && (hasProgressDocuments() == other.hasProgressDocuments()); + if (hasProgressDocuments()) { + result = result && getProgressDocuments().equals(other.getProgressDocuments()); + } + result = result && (hasProgressBytes() == other.hasProgressBytes()); + if (hasProgressBytes()) { + result = result && getProgressBytes().equals(other.getProgressBytes()); + } + result = result && getCollectionIdsList().equals(other.getCollectionIdsList()); + result = result && getInputUriPrefix().equals(other.getInputUriPrefix()); + 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + OPERATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + operationState_; + if (hasProgressDocuments()) { + hash = (37 * hash) + PROGRESS_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getProgressDocuments().hashCode(); + } + if (hasProgressBytes()) { + hash = (37 * hash) + PROGRESS_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProgressBytes().hashCode(); + } + if (getCollectionIdsCount() > 0) { + hash = (37 * hash) + COLLECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionIdsList().hashCode(); + } + hash = (37 * hash) + INPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getInputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata 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.admin.v1.ImportDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata 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.admin.v1.ImportDocumentsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata 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.admin.v1.ImportDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata 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.admin.v1.ImportDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata 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.admin.v1.ImportDocumentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+   * [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ImportDocumentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ImportDocumentsMetadata) + com.google.firestore.admin.v1.ImportDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ImportDocumentsMetadata.class, + com.google.firestore.admin.v1.ImportDocumentsMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ImportDocumentsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + operationState_ = 0; + + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + inputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ImportDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsMetadata build() { + com.google.firestore.admin.v1.ImportDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsMetadata buildPartial() { + com.google.firestore.admin.v1.ImportDocumentsMetadata result = + new com.google.firestore.admin.v1.ImportDocumentsMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.operationState_ = operationState_; + if (progressDocumentsBuilder_ == null) { + result.progressDocuments_ = progressDocuments_; + } else { + result.progressDocuments_ = progressDocumentsBuilder_.build(); + } + if (progressBytesBuilder_ == null) { + result.progressBytes_ = progressBytes_; + } else { + result.progressBytes_ = progressBytesBuilder_.build(); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.collectionIds_ = collectionIds_; + result.inputUriPrefix_ = inputUriPrefix_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ImportDocumentsMetadata) { + return mergeFrom((com.google.firestore.admin.v1.ImportDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ImportDocumentsMetadata other) { + if (other == com.google.firestore.admin.v1.ImportDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.operationState_ != 0) { + setOperationStateValue(other.getOperationStateValue()); + } + if (other.hasProgressDocuments()) { + mergeProgressDocuments(other.getProgressDocuments()); + } + if (other.hasProgressBytes()) { + mergeProgressBytes(other.getProgressBytes()); + } + if (!other.collectionIds_.isEmpty()) { + if (collectionIds_.isEmpty()) { + collectionIds_ = other.collectionIds_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureCollectionIdsIsMutable(); + collectionIds_.addAll(other.collectionIds_); + } + onChanged(); + } + if (!other.getInputUriPrefix().isEmpty()) { + inputUriPrefix_ = other.inputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ImportDocumentsMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.ImportDocumentsMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int operationState_ = 0; + /** + * + * + *
+     * The state of the import operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public int getOperationStateValue() { + return operationState_; + } + /** + * + * + *
+     * The state of the import operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public Builder setOperationStateValue(int value) { + operationState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the import operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public com.google.firestore.admin.v1.OperationState getOperationState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the import operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public Builder setOperationState(com.google.firestore.admin.v1.OperationState value) { + if (value == null) { + throw new NullPointerException(); + } + + operationState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the import operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + public Builder clearOperationState() { + + operationState_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.Progress progressDocuments_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressDocumentsBuilder_; + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public boolean hasProgressDocuments() { + return progressDocumentsBuilder_ != null || progressDocuments_ != null; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } else { + return progressDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressDocuments_ = value; + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder setProgressDocuments( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = builderForValue.build(); + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (progressDocuments_ != null) { + progressDocuments_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + progressDocuments_ = value; + } + onChanged(); + } else { + progressDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder clearProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + onChanged(); + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilder() { + + onChanged(); + return getProgressDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + if (progressDocumentsBuilder_ != null) { + return progressDocumentsBuilder_.getMessageOrBuilder(); + } else { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressDocumentsFieldBuilder() { + if (progressDocumentsBuilder_ == null) { + progressDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressDocuments(), getParentForChildren(), isClean()); + progressDocuments_ = null; + } + return progressDocumentsBuilder_; + } + + private com.google.firestore.admin.v1.Progress progressBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressBytesBuilder_; + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public boolean hasProgressBytes() { + return progressBytesBuilder_ != null || progressBytes_ != null; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + if (progressBytesBuilder_ == null) { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } else { + return progressBytesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressBytes_ = value; + onChanged(); + } else { + progressBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder setProgressBytes( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressBytesBuilder_ == null) { + progressBytes_ = builderForValue.build(); + onChanged(); + } else { + progressBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (progressBytes_ != null) { + progressBytes_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressBytes_) + .mergeFrom(value) + .buildPartial(); + } else { + progressBytes_ = value; + } + onChanged(); + } else { + progressBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder clearProgressBytes() { + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + onChanged(); + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() { + + onChanged(); + return getProgressBytesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + if (progressBytesBuilder_ != null) { + return progressBytesBuilder_.getMessageOrBuilder(); + } else { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressBytesFieldBuilder() { + if (progressBytesBuilder_ == null) { + progressBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressBytes(), getParentForChildren(), isClean()); + progressBytes_ = null; + } + return progressBytesBuilder_; + } + + private com.google.protobuf.LazyStringList collectionIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCollectionIdsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(collectionIds_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder setCollectionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder addCollectionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder addAllCollectionIds(java.lang.Iterable values) { + ensureCollectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder clearCollectionIds() { + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids are being imported.
+     * 
+ * + * repeated string collection_ids = 6; + */ + public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object inputUriPrefix_ = ""; + /** + * + * + *
+     * The location of the documents being imported.
+     * 
+ * + * string input_uri_prefix = 7; + */ + public java.lang.String getInputUriPrefix() { + java.lang.Object ref = inputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The location of the documents being imported.
+     * 
+ * + * string input_uri_prefix = 7; + */ + public com.google.protobuf.ByteString getInputUriPrefixBytes() { + java.lang.Object ref = inputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The location of the documents being imported.
+     * 
+ * + * string input_uri_prefix = 7; + */ + public Builder setInputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the documents being imported.
+     * 
+ * + * string input_uri_prefix = 7; + */ + public Builder clearInputUriPrefix() { + + inputUriPrefix_ = getDefaultInstance().getInputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the documents being imported.
+     * 
+ * + * string input_uri_prefix = 7; + */ + public Builder setInputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUriPrefix_ = 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.admin.v1.ImportDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ImportDocumentsMetadata) + private static final com.google.firestore.admin.v1.ImportDocumentsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ImportDocumentsMetadata(); + } + + public static com.google.firestore.admin.v1.ImportDocumentsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDocumentsMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000000..9c7c5cb59260 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadataOrBuilder.java @@ -0,0 +1,220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public interface ImportDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ImportDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The state of the import operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + int getOperationStateValue(); + /** + * + * + *
+   * The state of the import operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + */ + com.google.firestore.admin.v1.OperationState getOperationState(); + + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + boolean hasProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder(); + + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + boolean hasProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + com.google.firestore.admin.v1.Progress getProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder(); + + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + java.util.List getCollectionIdsList(); + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + int getCollectionIdsCount(); + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + java.lang.String getCollectionIds(int index); + /** + * + * + *
+   * Which collection ids are being imported.
+   * 
+ * + * repeated string collection_ids = 6; + */ + com.google.protobuf.ByteString getCollectionIdsBytes(int index); + + /** + * + * + *
+   * The location of the documents being imported.
+   * 
+ * + * string input_uri_prefix = 7; + */ + java.lang.String getInputUriPrefix(); + /** + * + * + *
+   * The location of the documents being imported.
+   * 
+ * + * string input_uri_prefix = 7; + */ + com.google.protobuf.ByteString getInputUriPrefixBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java new file mode 100644 index 000000000000..0b2bd2219716 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java @@ -0,0 +1,1055 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ImportDocumentsRequest} + */ +public final class ImportDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ImportDocumentsRequest) + ImportDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsRequest.newBuilder() to construct. + private ImportDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsRequest() { + name_ = ""; + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inputUriPrefix_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDocumentsRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + collectionIds_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUriPrefix_ = 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_ & 0x00000002) == 0x00000002)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ImportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ImportDocumentsRequest.class, + com.google.firestore.admin.v1.ImportDocumentsRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Database to import into. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Database to import into. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * 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 COLLECTION_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList collectionIds_; + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_; + } + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + + public static final int INPUT_URI_PREFIX_FIELD_NUMBER = 3; + private volatile java.lang.Object inputUriPrefix_; + /** + * + * + *
+   * Location of the exported files.
+   * This must match the output_uri_prefix of an ExportDocumentsResponse from
+   * an export that has completed successfully.
+   * See:
+   * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+   * 
+ * + * string input_uri_prefix = 3; + */ + public java.lang.String getInputUriPrefix() { + java.lang.Object ref = inputUriPrefix_; + 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(); + inputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Location of the exported files.
+   * This must match the output_uri_prefix of an ExportDocumentsResponse from
+   * an export that has completed successfully.
+   * See:
+   * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+   * 
+ * + * string input_uri_prefix = 3; + */ + public com.google.protobuf.ByteString getInputUriPrefixBytes() { + java.lang.Object ref = inputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < collectionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collectionIds_.getRaw(i)); + } + if (!getInputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, inputUriPrefix_); + } + 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_); + } + { + int dataSize = 0; + for (int i = 0; i < collectionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(collectionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getCollectionIdsList().size(); + } + if (!getInputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, inputUriPrefix_); + } + 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.admin.v1.ImportDocumentsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ImportDocumentsRequest other = + (com.google.firestore.admin.v1.ImportDocumentsRequest) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + result = result && getCollectionIdsList().equals(other.getCollectionIdsList()); + result = result && getInputUriPrefix().equals(other.getInputUriPrefix()); + 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 (getCollectionIdsCount() > 0) { + hash = (37 * hash) + COLLECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionIdsList().hashCode(); + } + hash = (37 * hash) + INPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getInputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest 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.admin.v1.ImportDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest 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.admin.v1.ImportDocumentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest 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.admin.v1.ImportDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest 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.admin.v1.ImportDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest 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.admin.v1.ImportDocumentsRequest 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 [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ImportDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ImportDocumentsRequest) + com.google.firestore.admin.v1.ImportDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ImportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ImportDocumentsRequest.class, + com.google.firestore.admin.v1.ImportDocumentsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ImportDocumentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + inputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ImportDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsRequest build() { + com.google.firestore.admin.v1.ImportDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsRequest buildPartial() { + com.google.firestore.admin.v1.ImportDocumentsRequest result = + new com.google.firestore.admin.v1.ImportDocumentsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + collectionIds_ = collectionIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.collectionIds_ = collectionIds_; + result.inputUriPrefix_ = inputUriPrefix_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ImportDocumentsRequest) { + return mergeFrom((com.google.firestore.admin.v1.ImportDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ImportDocumentsRequest other) { + if (other == com.google.firestore.admin.v1.ImportDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.collectionIds_.isEmpty()) { + if (collectionIds_.isEmpty()) { + collectionIds_ = other.collectionIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCollectionIdsIsMutable(); + collectionIds_.addAll(other.collectionIds_); + } + onChanged(); + } + if (!other.getInputUriPrefix().isEmpty()) { + inputUriPrefix_ = other.inputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ImportDocumentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.ImportDocumentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Database to import into. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Database to import into. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Database to import into. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Database to import into. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Database to import into. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * 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.LazyStringList collectionIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCollectionIdsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(collectionIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder setCollectionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder addCollectionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder addAllCollectionIds(java.lang.Iterable values) { + ensureCollectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder clearCollectionIds() { + collectionIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Which collection ids to import. Unspecified means all collections included
+     * in the import.
+     * 
+ * + * repeated string collection_ids = 2; + */ + public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object inputUriPrefix_ = ""; + /** + * + * + *
+     * Location of the exported files.
+     * This must match the output_uri_prefix of an ExportDocumentsResponse from
+     * an export that has completed successfully.
+     * See:
+     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+     * 
+ * + * string input_uri_prefix = 3; + */ + public java.lang.String getInputUriPrefix() { + java.lang.Object ref = inputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location of the exported files.
+     * This must match the output_uri_prefix of an ExportDocumentsResponse from
+     * an export that has completed successfully.
+     * See:
+     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+     * 
+ * + * string input_uri_prefix = 3; + */ + public com.google.protobuf.ByteString getInputUriPrefixBytes() { + java.lang.Object ref = inputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location of the exported files.
+     * This must match the output_uri_prefix of an ExportDocumentsResponse from
+     * an export that has completed successfully.
+     * See:
+     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+     * 
+ * + * string input_uri_prefix = 3; + */ + public Builder setInputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Location of the exported files.
+     * This must match the output_uri_prefix of an ExportDocumentsResponse from
+     * an export that has completed successfully.
+     * See:
+     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+     * 
+ * + * string input_uri_prefix = 3; + */ + public Builder clearInputUriPrefix() { + + inputUriPrefix_ = getDefaultInstance().getInputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Location of the exported files.
+     * This must match the output_uri_prefix of an ExportDocumentsResponse from
+     * an export that has completed successfully.
+     * See:
+     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+     * 
+ * + * string input_uri_prefix = 3; + */ + public Builder setInputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUriPrefix_ = 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.admin.v1.ImportDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ImportDocumentsRequest) + private static final com.google.firestore.admin.v1.ImportDocumentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ImportDocumentsRequest(); + } + + public static com.google.firestore.admin.v1.ImportDocumentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDocumentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ImportDocumentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..b9efe59427e1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface ImportDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ImportDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Database to import into. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Database to import into. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + java.util.List getCollectionIdsList(); + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + int getCollectionIdsCount(); + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + java.lang.String getCollectionIds(int index); + /** + * + * + *
+   * Which collection ids to import. Unspecified means all collections included
+   * in the import.
+   * 
+ * + * repeated string collection_ids = 2; + */ + com.google.protobuf.ByteString getCollectionIdsBytes(int index); + + /** + * + * + *
+   * Location of the exported files.
+   * This must match the output_uri_prefix of an ExportDocumentsResponse from
+   * an export that has completed successfully.
+   * See:
+   * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+   * 
+ * + * string input_uri_prefix = 3; + */ + java.lang.String getInputUriPrefix(); + /** + * + * + *
+   * Location of the exported files.
+   * This must match the output_uri_prefix of an ExportDocumentsResponse from
+   * an export that has completed successfully.
+   * See:
+   * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
+   * 
+ * + * string input_uri_prefix = 3; + */ + com.google.protobuf.ByteString getInputUriPrefixBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java new file mode 100644 index 000000000000..25f161687743 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java @@ -0,0 +1,3277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/index.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Cloud Firestore indexes enable simple and complex queries against
+ * documents in a database.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Index} + */ +public final class Index extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index) + IndexOrBuilder { + private static final long serialVersionUID = 0L; + // Use Index.newBuilder() to construct. + private Index(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Index() { + name_ = ""; + queryScope_ = 0; + fields_ = java.util.Collections.emptyList(); + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Index( + 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 16: + { + int rawValue = input.readEnum(); + + queryScope_ = rawValue; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + fields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + fields_.add( + input.readMessage( + com.google.firestore.admin.v1.Index.IndexField.parser(), extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + 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_ & 0x00000004) == 0x00000004)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Index.class, + com.google.firestore.admin.v1.Index.Builder.class); + } + + /** + * + * + *
+   * Query Scope defines the scope at which a query is run. This is specified on
+   * a StructuredQuery's `from` field.
+   * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.Index.QueryScope} + */ + public enum QueryScope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The query scope is unspecified. Not a valid option.
+     * 
+ * + * QUERY_SCOPE_UNSPECIFIED = 0; + */ + QUERY_SCOPE_UNSPECIFIED(0), + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified
+     * at query time, and that has the collection id specified by the index.
+     * 
+ * + * COLLECTION = 1; + */ + COLLECTION(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The query scope is unspecified. Not a valid option.
+     * 
+ * + * QUERY_SCOPE_UNSPECIFIED = 0; + */ + public static final int QUERY_SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified
+     * at query time, and that has the collection id specified by the index.
+     * 
+ * + * COLLECTION = 1; + */ + public static final int COLLECTION_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static QueryScope valueOf(int value) { + return forNumber(value); + } + + public static QueryScope forNumber(int value) { + switch (value) { + case 0: + return QUERY_SCOPE_UNSPECIFIED; + case 1: + return COLLECTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public QueryScope findValueByNumber(int number) { + return QueryScope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.Index.getDescriptor().getEnumTypes().get(0); + } + + private static final QueryScope[] VALUES = values(); + + public static QueryScope valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private QueryScope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.QueryScope) + } + + /** + * + * + *
+   * The state of an index. During index creation, an index will be in the
+   * `CREATING` state. If the index is created successfully, it will transition
+   * to the `READY` state. If the index creation encounters a problem, the index
+   * will transition to the `NEEDS_REPAIR` state.
+   * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.Index.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The index is being created.
+     * There is an active long-running operation for the index.
+     * The index is updated when writing a document.
+     * Some index data may exist.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The index is ready to be used.
+     * The index is updated when writing a document.
+     * The index is fully populated from all stored documents it applies to.
+     * 
+ * + * READY = 2; + */ + READY(2), + /** + * + * + *
+     * The index was being created, but something went wrong.
+     * There is no active long-running operation for the index,
+     * and the most recently finished long-running operation failed.
+     * The index is not updated when writing a document.
+     * Some index data may exist.
+     * Use the google.longrunning.Operations API to determine why the operation
+     * that last attempted to create this index failed, then re-create the
+     * index.
+     * 
+ * + * NEEDS_REPAIR = 3; + */ + NEEDS_REPAIR(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The index is being created.
+     * There is an active long-running operation for the index.
+     * The index is updated when writing a document.
+     * Some index data may exist.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * The index is ready to be used.
+     * The index is updated when writing a document.
+     * The index is fully populated from all stored documents it applies to.
+     * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + /** + * + * + *
+     * The index was being created, but something went wrong.
+     * There is no active long-running operation for the index,
+     * and the most recently finished long-running operation failed.
+     * The index is not updated when writing a document.
+     * Some index data may exist.
+     * Use the google.longrunning.Operations API to determine why the operation
+     * that last attempted to create this index failed, then re-create the
+     * index.
+     * 
+ * + * NEEDS_REPAIR = 3; + */ + public static final int NEEDS_REPAIR_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return READY; + case 3: + return NEEDS_REPAIR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.Index.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.State) + } + + public interface IndexFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Can be __name__.
+     * For single field indexes, this must match the name of the field or may
+     * be omitted.
+     * 
+ * + * string field_path = 1; + */ + java.lang.String getFieldPath(); + /** + * + * + *
+     * Can be __name__.
+     * For single field indexes, this must match the name of the field or may
+     * be omitted.
+     * 
+ * + * string field_path = 1; + */ + com.google.protobuf.ByteString getFieldPathBytes(); + + /** + * + * + *
+     * Indicates that this field supports ordering by the specified order or
+     * comparing using =, <, <=, >, >=.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + int getOrderValue(); + /** + * + * + *
+     * Indicates that this field supports ordering by the specified order or
+     * comparing using =, <, <=, >, >=.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + com.google.firestore.admin.v1.Index.IndexField.Order getOrder(); + + /** + * + * + *
+     * Indicates that this field supports operations on `array_value`s.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + int getArrayConfigValue(); + /** + * + * + *
+     * Indicates that this field supports operations on `array_value`s.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig(); + + public com.google.firestore.admin.v1.Index.IndexField.ValueModeCase getValueModeCase(); + } + /** + * + * + *
+   * A field in an index.
+   * The field_path describes which field is indexed, the value_mode describes
+   * how the field value is indexed.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Index.IndexField} + */ + public static final class IndexField extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField) + IndexFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexField.newBuilder() to construct. + private IndexField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexField() { + fieldPath_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexField( + 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(); + + fieldPath_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + valueModeCase_ = 2; + valueMode_ = rawValue; + break; + } + case 24: + { + int rawValue = input.readEnum(); + valueModeCase_ = 3; + valueMode_ = rawValue; + 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.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_IndexField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Index.IndexField.class, + com.google.firestore.admin.v1.Index.IndexField.Builder.class); + } + + /** + * + * + *
+     * The supported orderings.
+     * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.Index.IndexField.Order} + */ + public enum Order implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The ordering is unspecified. Not a valid option.
+       * 
+ * + * ORDER_UNSPECIFIED = 0; + */ + ORDER_UNSPECIFIED(0), + /** + * + * + *
+       * The field is ordered by ascending field value.
+       * 
+ * + * ASCENDING = 1; + */ + ASCENDING(1), + /** + * + * + *
+       * The field is ordered by descending field value.
+       * 
+ * + * DESCENDING = 2; + */ + DESCENDING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The ordering is unspecified. Not a valid option.
+       * 
+ * + * ORDER_UNSPECIFIED = 0; + */ + public static final int ORDER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The field is ordered by ascending field value.
+       * 
+ * + * ASCENDING = 1; + */ + public static final int ASCENDING_VALUE = 1; + /** + * + * + *
+       * The field is ordered by descending field value.
+       * 
+ * + * DESCENDING = 2; + */ + public static final int DESCENDING_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Order valueOf(int value) { + return forNumber(value); + } + + public static Order forNumber(int value) { + switch (value) { + case 0: + return ORDER_UNSPECIFIED; + case 1: + return ASCENDING; + case 2: + return DESCENDING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Order findValueByNumber(int number) { + return Order.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.Index.IndexField.getDescriptor().getEnumTypes().get(0); + } + + private static final Order[] VALUES = values(); + + public static Order valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Order(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.IndexField.Order) + } + + /** + * + * + *
+     * The supported array value configurations.
+     * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.Index.IndexField.ArrayConfig} + */ + public enum ArrayConfig implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The index does not support additional array queries.
+       * 
+ * + * ARRAY_CONFIG_UNSPECIFIED = 0; + */ + ARRAY_CONFIG_UNSPECIFIED(0), + /** + * + * + *
+       * The index supports array containment queries.
+       * 
+ * + * CONTAINS = 1; + */ + CONTAINS(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The index does not support additional array queries.
+       * 
+ * + * ARRAY_CONFIG_UNSPECIFIED = 0; + */ + public static final int ARRAY_CONFIG_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The index supports array containment queries.
+       * 
+ * + * CONTAINS = 1; + */ + public static final int CONTAINS_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ArrayConfig valueOf(int value) { + return forNumber(value); + } + + public static ArrayConfig forNumber(int value) { + switch (value) { + case 0: + return ARRAY_CONFIG_UNSPECIFIED; + case 1: + return CONTAINS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ArrayConfig findValueByNumber(int number) { + return ArrayConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.Index.IndexField.getDescriptor().getEnumTypes().get(1); + } + + private static final ArrayConfig[] VALUES = values(); + + public static ArrayConfig valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ArrayConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.IndexField.ArrayConfig) + } + + private int valueModeCase_ = 0; + private java.lang.Object valueMode_; + + public enum ValueModeCase implements com.google.protobuf.Internal.EnumLite { + ORDER(2), + ARRAY_CONFIG(3), + VALUEMODE_NOT_SET(0); + private final int value; + + private ValueModeCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ValueModeCase valueOf(int value) { + return forNumber(value); + } + + public static ValueModeCase forNumber(int value) { + switch (value) { + case 2: + return ORDER; + case 3: + return ARRAY_CONFIG; + case 0: + return VALUEMODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueModeCase getValueModeCase() { + return ValueModeCase.forNumber(valueModeCase_); + } + + public static final int FIELD_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object fieldPath_; + /** + * + * + *
+     * Can be __name__.
+     * For single field indexes, this must match the name of the field or may
+     * be omitted.
+     * 
+ * + * string field_path = 1; + */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + 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(); + fieldPath_ = s; + return s; + } + } + /** + * + * + *
+     * Can be __name__.
+     * For single field indexes, this must match the name of the field or may
+     * be omitted.
+     * 
+ * + * string field_path = 1; + */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_FIELD_NUMBER = 2; + /** + * + * + *
+     * Indicates that this field supports ordering by the specified order or
+     * comparing using =, <, <=, >, >=.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public int getOrderValue() { + if (valueModeCase_ == 2) { + return (java.lang.Integer) valueMode_; + } + return 0; + } + /** + * + * + *
+     * Indicates that this field supports ordering by the specified order or
+     * comparing using =, <, <=, >, >=.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() { + if (valueModeCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.IndexField.Order result = + com.google.firestore.admin.v1.Index.IndexField.Order.valueOf( + (java.lang.Integer) valueMode_); + return result == null + ? com.google.firestore.admin.v1.Index.IndexField.Order.UNRECOGNIZED + : result; + } + return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED; + } + + public static final int ARRAY_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+     * Indicates that this field supports operations on `array_value`s.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public int getArrayConfigValue() { + if (valueModeCase_ == 3) { + return (java.lang.Integer) valueMode_; + } + return 0; + } + /** + * + * + *
+     * Indicates that this field supports operations on `array_value`s.
+     * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() { + if (valueModeCase_ == 3) { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.IndexField.ArrayConfig result = + com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.valueOf( + (java.lang.Integer) valueMode_); + return result == null + ? com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.UNRECOGNIZED + : result; + } + return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED; + } + + 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 (!getFieldPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldPath_); + } + if (valueModeCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) valueMode_)); + } + if (valueModeCase_ == 3) { + output.writeEnum(3, ((java.lang.Integer) valueMode_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFieldPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldPath_); + } + if (valueModeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 2, ((java.lang.Integer) valueMode_)); + } + if (valueModeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 3, ((java.lang.Integer) valueMode_)); + } + 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.admin.v1.Index.IndexField)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Index.IndexField other = + (com.google.firestore.admin.v1.Index.IndexField) obj; + + boolean result = true; + result = result && getFieldPath().equals(other.getFieldPath()); + result = result && getValueModeCase().equals(other.getValueModeCase()); + if (!result) return false; + switch (valueModeCase_) { + case 2: + result = result && getOrderValue() == other.getOrderValue(); + break; + case 3: + result = result && getArrayConfigValue() == other.getArrayConfigValue(); + 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) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); + switch (valueModeCase_) { + case 2: + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrderValue(); + break; + case 3: + hash = (37 * hash) + ARRAY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getArrayConfigValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Index.IndexField parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Index.IndexField 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.admin.v1.Index.IndexField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Index.IndexField 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.admin.v1.Index.IndexField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Index.IndexField parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Index.IndexField parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Index.IndexField 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.admin.v1.Index.IndexField parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Index.IndexField 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.admin.v1.Index.IndexField parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Index.IndexField 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.admin.v1.Index.IndexField 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 field in an index.
+     * The field_path describes which field is indexed, the value_mode describes
+     * how the field value is indexed.
+     * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Index.IndexField} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField) + com.google.firestore.admin.v1.Index.IndexFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_IndexField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Index.IndexField.class, + com.google.firestore.admin.v1.Index.IndexField.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Index.IndexField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + fieldPath_ = ""; + + valueModeCase_ = 0; + valueMode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index.IndexField build() { + com.google.firestore.admin.v1.Index.IndexField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index.IndexField buildPartial() { + com.google.firestore.admin.v1.Index.IndexField result = + new com.google.firestore.admin.v1.Index.IndexField(this); + result.fieldPath_ = fieldPath_; + if (valueModeCase_ == 2) { + result.valueMode_ = valueMode_; + } + if (valueModeCase_ == 3) { + result.valueMode_ = valueMode_; + } + result.valueModeCase_ = valueModeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Index.IndexField) { + return mergeFrom((com.google.firestore.admin.v1.Index.IndexField) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Index.IndexField other) { + if (other == com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance()) + return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; + onChanged(); + } + switch (other.getValueModeCase()) { + case ORDER: + { + setOrderValue(other.getOrderValue()); + break; + } + case ARRAY_CONFIG: + { + setArrayConfigValue(other.getArrayConfigValue()); + break; + } + case VALUEMODE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.Index.IndexField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.Index.IndexField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueModeCase_ = 0; + private java.lang.Object valueMode_; + + public ValueModeCase getValueModeCase() { + return ValueModeCase.forNumber(valueModeCase_); + } + + public Builder clearValueMode() { + valueModeCase_ = 0; + valueMode_ = null; + onChanged(); + return this; + } + + private java.lang.Object fieldPath_ = ""; + /** + * + * + *
+       * Can be __name__.
+       * For single field indexes, this must match the name of the field or may
+       * be omitted.
+       * 
+ * + * string field_path = 1; + */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Can be __name__.
+       * For single field indexes, this must match the name of the field or may
+       * be omitted.
+       * 
+ * + * string field_path = 1; + */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Can be __name__.
+       * For single field indexes, this must match the name of the field or may
+       * be omitted.
+       * 
+ * + * string field_path = 1; + */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fieldPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Can be __name__.
+       * For single field indexes, this must match the name of the field or may
+       * be omitted.
+       * 
+ * + * string field_path = 1; + */ + public Builder clearFieldPath() { + + fieldPath_ = getDefaultInstance().getFieldPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * Can be __name__.
+       * For single field indexes, this must match the name of the field or may
+       * be omitted.
+       * 
+ * + * string field_path = 1; + */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fieldPath_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Indicates that this field supports ordering by the specified order or
+       * comparing using =, <, <=, >, >=.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public int getOrderValue() { + if (valueModeCase_ == 2) { + return ((java.lang.Integer) valueMode_).intValue(); + } + return 0; + } + /** + * + * + *
+       * Indicates that this field supports ordering by the specified order or
+       * comparing using =, <, <=, >, >=.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public Builder setOrderValue(int value) { + valueModeCase_ = 2; + valueMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates that this field supports ordering by the specified order or
+       * comparing using =, <, <=, >, >=.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() { + if (valueModeCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.IndexField.Order result = + com.google.firestore.admin.v1.Index.IndexField.Order.valueOf( + (java.lang.Integer) valueMode_); + return result == null + ? com.google.firestore.admin.v1.Index.IndexField.Order.UNRECOGNIZED + : result; + } + return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED; + } + /** + * + * + *
+       * Indicates that this field supports ordering by the specified order or
+       * comparing using =, <, <=, >, >=.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public Builder setOrder(com.google.firestore.admin.v1.Index.IndexField.Order value) { + if (value == null) { + throw new NullPointerException(); + } + valueModeCase_ = 2; + valueMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates that this field supports ordering by the specified order or
+       * comparing using =, <, <=, >, >=.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.Order order = 2; + */ + public Builder clearOrder() { + if (valueModeCase_ == 2) { + valueModeCase_ = 0; + valueMode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Indicates that this field supports operations on `array_value`s.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public int getArrayConfigValue() { + if (valueModeCase_ == 3) { + return ((java.lang.Integer) valueMode_).intValue(); + } + return 0; + } + /** + * + * + *
+       * Indicates that this field supports operations on `array_value`s.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public Builder setArrayConfigValue(int value) { + valueModeCase_ = 3; + valueMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates that this field supports operations on `array_value`s.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() { + if (valueModeCase_ == 3) { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.IndexField.ArrayConfig result = + com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.valueOf( + (java.lang.Integer) valueMode_); + return result == null + ? com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.UNRECOGNIZED + : result; + } + return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED; + } + /** + * + * + *
+       * Indicates that this field supports operations on `array_value`s.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public Builder setArrayConfig( + com.google.firestore.admin.v1.Index.IndexField.ArrayConfig value) { + if (value == null) { + throw new NullPointerException(); + } + valueModeCase_ = 3; + valueMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates that this field supports operations on `array_value`s.
+       * 
+ * + * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + */ + public Builder clearArrayConfig() { + if (valueModeCase_ == 3) { + valueModeCase_ = 0; + valueMode_ = null; + 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.admin.v1.Index.IndexField) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField) + private static final com.google.firestore.admin.v1.Index.IndexField DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Index.IndexField(); + } + + public static com.google.firestore.admin.v1.Index.IndexField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only.
+   * A server defined name for this index.
+   * The form of this name for composite indexes will be:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+   * For single field indexes, this field will be empty.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Output only.
+   * A server defined name for this index.
+   * The form of this name for composite indexes will be:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+   * For single field indexes, this field will be empty.
+   * 
+ * + * 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 QUERY_SCOPE_FIELD_NUMBER = 2; + private int queryScope_; + /** + * + * + *
+   * Indexes with a collection query scope specified allow queries
+   * against a collection that is the child of a specific document, specified at
+   * query time, and that has the same collection id.
+   * Indexes with a collection group query scope specified allow queries against
+   * all collections descended from a specific document, specified at query
+   * time, and that have the same collection id as this index.
+   * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public int getQueryScopeValue() { + return queryScope_; + } + /** + * + * + *
+   * Indexes with a collection query scope specified allow queries
+   * against a collection that is the child of a specific document, specified at
+   * query time, and that has the same collection id.
+   * Indexes with a collection group query scope specified allow queries against
+   * all collections descended from a specific document, specified at query
+   * time, and that have the same collection id as this index.
+   * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.QueryScope result = + com.google.firestore.admin.v1.Index.QueryScope.valueOf(queryScope_); + return result == null ? com.google.firestore.admin.v1.Index.QueryScope.UNRECOGNIZED : result; + } + + public static final int FIELDS_FIELD_NUMBER = 3; + private java.util.List fields_; + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public java.util.List getFieldsList() { + return fields_; + } + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public int getFieldsCount() { + return fields_.size(); + } + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField getFields(int index) { + return fields_.get(index); + } + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * Output only.
+   * The serving state of the index.
+   * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only.
+   * The serving state of the index.
+   * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public com.google.firestore.admin.v1.Index.State getState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.State result = + com.google.firestore.admin.v1.Index.State.valueOf(state_); + return result == null ? com.google.firestore.admin.v1.Index.State.UNRECOGNIZED : result; + } + + 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 (queryScope_ + != com.google.firestore.admin.v1.Index.QueryScope.QUERY_SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, queryScope_); + } + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(3, fields_.get(i)); + } + if (state_ != com.google.firestore.admin.v1.Index.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + 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 (queryScope_ + != com.google.firestore.admin.v1.Index.QueryScope.QUERY_SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, queryScope_); + } + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fields_.get(i)); + } + if (state_ != com.google.firestore.admin.v1.Index.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + 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.admin.v1.Index)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Index other = (com.google.firestore.admin.v1.Index) obj; + + boolean result = true; + result = result && getName().equals(other.getName()); + result = result && queryScope_ == other.queryScope_; + result = result && getFieldsList().equals(other.getFieldsList()); + result = result && state_ == other.state_; + 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(); + hash = (37 * hash) + QUERY_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + queryScope_; + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Index parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Index 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.admin.v1.Index parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Index 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.admin.v1.Index parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Index parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Index parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Index 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.admin.v1.Index parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Index 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.admin.v1.Index parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Index 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.admin.v1.Index 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; + } + /** + * + * + *
+   * Cloud Firestore indexes enable simple and complex queries against
+   * documents in a database.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Index} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index) + com.google.firestore.admin.v1.IndexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Index.class, + com.google.firestore.admin.v1.Index.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Index.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + queryScope_ = 0; + + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + fieldsBuilder_.clear(); + } + state_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.IndexProto + .internal_static_google_firestore_admin_v1_Index_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Index.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index build() { + com.google.firestore.admin.v1.Index result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index buildPartial() { + com.google.firestore.admin.v1.Index result = new com.google.firestore.admin.v1.Index(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.queryScope_ = queryScope_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + result.state_ = state_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Index) { + return mergeFrom((com.google.firestore.admin.v1.Index) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Index other) { + if (other == com.google.firestore.admin.v1.Index.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.queryScope_ != 0) { + setQueryScopeValue(other.getQueryScopeValue()); + } + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000004); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.Index parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.Index) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only.
+     * A server defined name for this index.
+     * The form of this name for composite indexes will be:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+     * For single field indexes, this field will be empty.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Output only.
+     * A server defined name for this index.
+     * The form of this name for composite indexes will be:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+     * For single field indexes, this field will be empty.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Output only.
+     * A server defined name for this index.
+     * The form of this name for composite indexes will be:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+     * For single field indexes, this field will be empty.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * A server defined name for this index.
+     * The form of this name for composite indexes will be:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+     * For single field indexes, this field will be empty.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * A server defined name for this index.
+     * The form of this name for composite indexes will be:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+     * For single field indexes, this field will be empty.
+     * 
+ * + * 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 int queryScope_ = 0; + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified at
+     * query time, and that has the same collection id.
+     * Indexes with a collection group query scope specified allow queries against
+     * all collections descended from a specific document, specified at query
+     * time, and that have the same collection id as this index.
+     * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public int getQueryScopeValue() { + return queryScope_; + } + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified at
+     * query time, and that has the same collection id.
+     * Indexes with a collection group query scope specified allow queries against
+     * all collections descended from a specific document, specified at query
+     * time, and that have the same collection id as this index.
+     * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public Builder setQueryScopeValue(int value) { + queryScope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified at
+     * query time, and that has the same collection id.
+     * Indexes with a collection group query scope specified allow queries against
+     * all collections descended from a specific document, specified at query
+     * time, and that have the same collection id as this index.
+     * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.QueryScope result = + com.google.firestore.admin.v1.Index.QueryScope.valueOf(queryScope_); + return result == null ? com.google.firestore.admin.v1.Index.QueryScope.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified at
+     * query time, and that has the same collection id.
+     * Indexes with a collection group query scope specified allow queries against
+     * all collections descended from a specific document, specified at query
+     * time, and that have the same collection id as this index.
+     * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public Builder setQueryScope(com.google.firestore.admin.v1.Index.QueryScope value) { + if (value == null) { + throw new NullPointerException(); + } + + queryScope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Indexes with a collection query scope specified allow queries
+     * against a collection that is the child of a specific document, specified at
+     * query time, and that has the same collection id.
+     * Indexes with a collection group query scope specified allow queries against
+     * all collections descended from a specific document, specified at query
+     * time, and that have the same collection id as this index.
+     * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + public Builder clearQueryScope() { + + queryScope_ = 0; + onChanged(); + return this; + } + + private java.util.List fields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index.IndexField, + com.google.firestore.admin.v1.Index.IndexField.Builder, + com.google.firestore.admin.v1.Index.IndexFieldOrBuilder> + fieldsBuilder_; + + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder setFields(int index, com.google.firestore.admin.v1.Index.IndexField value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder setFields( + int index, com.google.firestore.admin.v1.Index.IndexField.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder addFields(com.google.firestore.admin.v1.Index.IndexField value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder addFields(int index, com.google.firestore.admin.v1.Index.IndexField value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder addFields( + com.google.firestore.admin.v1.Index.IndexField.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder addFields( + int index, com.google.firestore.admin.v1.Index.IndexField.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField.Builder getFieldsBuilder(int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder() { + return getFieldsFieldBuilder() + .addBuilder(com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance()); + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder(int index) { + return getFieldsFieldBuilder() + .addBuilder(index, com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance()); + } + /** + * + * + *
+     * The fields supported by this index.
+     * For composite indexes, this is always 2 or more fields.
+     * The last field entry is always for the field path `__name__`. If, on
+     * creation, `__name__` was not specified as the last field, it will be added
+     * automatically with the same direction as that of the last field defined. If
+     * the final field in a composite index is not directional, the `__name__`
+     * will be ordered ASCENDING (unless explicitly specified).
+     * For single field indexes, this will always be exactly one entry with a
+     * field path equal to the field path of the associated field.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + public java.util.List + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index.IndexField, + com.google.firestore.admin.v1.Index.IndexField.Builder, + com.google.firestore.admin.v1.Index.IndexFieldOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index.IndexField, + com.google.firestore.admin.v1.Index.IndexField.Builder, + com.google.firestore.admin.v1.Index.IndexFieldOrBuilder>( + fields_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only.
+     * The serving state of the index.
+     * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only.
+     * The serving state of the index.
+     * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * The serving state of the index.
+     * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public com.google.firestore.admin.v1.Index.State getState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.Index.State result = + com.google.firestore.admin.v1.Index.State.valueOf(state_); + return result == null ? com.google.firestore.admin.v1.Index.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only.
+     * The serving state of the index.
+     * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public Builder setState(com.google.firestore.admin.v1.Index.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * The serving state of the index.
+     * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + public Builder clearState() { + + state_ = 0; + 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.admin.v1.Index) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index) + private static final com.google.firestore.admin.v1.Index DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Index(); + } + + public static com.google.firestore.admin.v1.Index getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Index parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Index(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Index getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java new file mode 100644 index 000000000000..2b62e32d30da --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java @@ -0,0 +1,248 @@ +/* + * 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.admin.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 IndexName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String database; + private final String collectionId; + private final String indexId; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getCollectionId() { + return collectionId; + } + + public String getIndexId() { + return indexId; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private IndexName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + database = Preconditions.checkNotNull(builder.getDatabase()); + collectionId = Preconditions.checkNotNull(builder.getCollectionId()); + indexId = Preconditions.checkNotNull(builder.getIndexId()); + } + + public static IndexName of(String project, String database, String collectionId, String indexId) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setCollectionId(collectionId) + .setIndexId(indexId) + .build(); + } + + public static String format( + String project, String database, String collectionId, String indexId) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setCollectionId(collectionId) + .setIndexId(indexId) + .build() + .toString(); + } + + public static IndexName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "IndexName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("database"), + matchMap.get("collection_id"), + matchMap.get("index_id")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (IndexName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("database", database); + fieldMapBuilder.put("collectionId", collectionId); + fieldMapBuilder.put("indexId", indexId); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "database", + database, + "collection_id", + collectionId, + "index_id", + indexId); + } + + /** Builder for IndexName. */ + public static class Builder { + + private String project; + private String database; + private String collectionId; + private String indexId; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getCollectionId() { + return collectionId; + } + + public String getIndexId() { + return indexId; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDatabase(String database) { + this.database = database; + return this; + } + + public Builder setCollectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + + public Builder setIndexId(String indexId) { + this.indexId = indexId; + return this; + } + + private Builder() {} + + private Builder(IndexName indexName) { + project = indexName.project; + database = indexName.database; + collectionId = indexName.collectionId; + indexId = indexName.indexId; + } + + public IndexName build() { + return new IndexName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof IndexName) { + IndexName that = (IndexName) o; + return (this.project.equals(that.project)) + && (this.database.equals(that.database)) + && (this.collectionId.equals(that.collectionId)) + && (this.indexId.equals(that.indexId)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= database.hashCode(); + h *= 1000003; + h ^= collectionId.hashCode(); + h *= 1000003; + h ^= indexId.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java new file mode 100644 index 000000000000..28b57180dd1b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java @@ -0,0 +1,1799 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+ * [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.IndexOperationMetadata} + */ +public final class IndexOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.IndexOperationMetadata) + IndexOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexOperationMetadata.newBuilder() to construct. + private IndexOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexOperationMetadata() { + index_ = ""; + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + index_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressDocuments_ != null) { + subBuilder = progressDocuments_.toBuilder(); + } + progressDocuments_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressDocuments_); + progressDocuments_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.firestore.admin.v1.Progress.Builder subBuilder = null; + if (progressBytes_ != null) { + subBuilder = progressBytes_.toBuilder(); + } + progressBytes_ = + input.readMessage( + com.google.firestore.admin.v1.Progress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progressBytes_); + progressBytes_ = 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.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_IndexOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.IndexOperationMetadata.class, + com.google.firestore.admin.v1.IndexOperationMetadata.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int INDEX_FIELD_NUMBER = 3; + private volatile java.lang.Object index_; + /** + * + * + *
+   * The index resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string index = 3; + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * The index resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string index = 3; + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public com.google.firestore.admin.v1.OperationState getState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(state_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 5; + private com.google.firestore.admin.v1.Progress progressDocuments_; + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public boolean hasProgressDocuments() { + return progressDocuments_ != null; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + return getProgressDocuments(); + } + + public static final int PROGRESS_BYTES_FIELD_NUMBER = 6; + private com.google.firestore.admin.v1.Progress progressBytes_; + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public boolean hasProgressBytes() { + return progressBytes_ != null; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + return getProgressBytes(); + } + + 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 (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getIndexBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, index_); + } + if (state_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (progressDocuments_ != null) { + output.writeMessage(5, getProgressDocuments()); + } + if (progressBytes_ != null) { + output.writeMessage(6, getProgressBytes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getIndexBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, index_); + } + if (state_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (progressDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProgressDocuments()); + } + if (progressBytes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProgressBytes()); + } + 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.admin.v1.IndexOperationMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.IndexOperationMetadata other = + (com.google.firestore.admin.v1.IndexOperationMetadata) obj; + + boolean result = true; + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && getStartTime().equals(other.getStartTime()); + } + result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime()) { + result = result && getEndTime().equals(other.getEndTime()); + } + result = result && getIndex().equals(other.getIndex()); + result = result && state_ == other.state_; + result = result && (hasProgressDocuments() == other.hasProgressDocuments()); + if (hasProgressDocuments()) { + result = result && getProgressDocuments().equals(other.getProgressDocuments()); + } + result = result && (hasProgressBytes() == other.hasProgressBytes()); + if (hasProgressBytes()) { + result = result && getProgressBytes().equals(other.getProgressBytes()); + } + 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasProgressDocuments()) { + hash = (37 * hash) + PROGRESS_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getProgressDocuments().hashCode(); + } + if (hasProgressBytes()) { + hash = (37 * hash) + PROGRESS_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProgressBytes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata 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.admin.v1.IndexOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata 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.admin.v1.IndexOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata 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.admin.v1.IndexOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata 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.admin.v1.IndexOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata 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.admin.v1.IndexOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
+   * [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.IndexOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.IndexOperationMetadata) + com.google.firestore.admin.v1.IndexOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_IndexOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.IndexOperationMetadata.class, + com.google.firestore.admin.v1.IndexOperationMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.IndexOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + index_ = ""; + + state_ = 0; + + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.IndexOperationMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.IndexOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.IndexOperationMetadata build() { + com.google.firestore.admin.v1.IndexOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.IndexOperationMetadata buildPartial() { + com.google.firestore.admin.v1.IndexOperationMetadata result = + new com.google.firestore.admin.v1.IndexOperationMetadata(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.index_ = index_; + result.state_ = state_; + if (progressDocumentsBuilder_ == null) { + result.progressDocuments_ = progressDocuments_; + } else { + result.progressDocuments_ = progressDocumentsBuilder_.build(); + } + if (progressBytesBuilder_ == null) { + result.progressBytes_ = progressBytes_; + } else { + result.progressBytes_ = progressBytesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.IndexOperationMetadata) { + return mergeFrom((com.google.firestore.admin.v1.IndexOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.IndexOperationMetadata other) { + if (other == com.google.firestore.admin.v1.IndexOperationMetadata.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasProgressDocuments()) { + mergeProgressDocuments(other.getProgressDocuments()); + } + if (other.hasProgressBytes()) { + mergeProgressBytes(other.getProgressBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.IndexOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.IndexOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp startTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * The index resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string index = 3; + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The index resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string index = 3; + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The index resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string index = 3; + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The index resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string index = 3; + */ + public Builder clearIndex() { + + index_ = getDefaultInstance().getIndex(); + onChanged(); + return this; + } + /** + * + * + *
+     * The index resource that this operation is acting on. For example:
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+     * 
+ * + * string index = 3; + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + index_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public com.google.firestore.admin.v1.OperationState getState() { + @SuppressWarnings("deprecation") + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.valueOf(state_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public Builder setState(com.google.firestore.admin.v1.OperationState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.Progress progressDocuments_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressDocumentsBuilder_; + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public boolean hasProgressDocuments() { + return progressDocumentsBuilder_ != null || progressDocuments_ != null; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } else { + return progressDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressDocuments_ = value; + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public Builder setProgressDocuments( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = builderForValue.build(); + onChanged(); + } else { + progressDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (progressDocuments_ != null) { + progressDocuments_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + progressDocuments_ = value; + } + onChanged(); + } else { + progressDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public Builder clearProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = null; + onChanged(); + } else { + progressDocuments_ = null; + progressDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilder() { + + onChanged(); + return getProgressDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + if (progressDocumentsBuilder_ != null) { + return progressDocumentsBuilder_.getMessageOrBuilder(); + } else { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressDocumentsFieldBuilder() { + if (progressDocumentsBuilder_ == null) { + progressDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressDocuments(), getParentForChildren(), isClean()); + progressDocuments_ = null; + } + return progressDocumentsBuilder_; + } + + private com.google.firestore.admin.v1.Progress progressBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressBytesBuilder_; + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public boolean hasProgressBytes() { + return progressBytesBuilder_ != null || progressBytes_ != null; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + if (progressBytesBuilder_ == null) { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } else { + return progressBytesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressBytes_ = value; + onChanged(); + } else { + progressBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public Builder setProgressBytes( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressBytesBuilder_ == null) { + progressBytes_ = builderForValue.build(); + onChanged(); + } else { + progressBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (progressBytes_ != null) { + progressBytes_ = + com.google.firestore.admin.v1.Progress.newBuilder(progressBytes_) + .mergeFrom(value) + .buildPartial(); + } else { + progressBytes_ = value; + } + onChanged(); + } else { + progressBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public Builder clearProgressBytes() { + if (progressBytesBuilder_ == null) { + progressBytes_ = null; + onChanged(); + } else { + progressBytes_ = null; + progressBytesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() { + + onChanged(); + return getProgressBytesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + if (progressBytesBuilder_ != null) { + return progressBytesBuilder_.getMessageOrBuilder(); + } else { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressBytesFieldBuilder() { + if (progressBytesBuilder_ == null) { + progressBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressBytes(), getParentForChildren(), isClean()); + progressBytes_ = null; + } + return progressBytesBuilder_; + } + + @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.admin.v1.IndexOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.IndexOperationMetadata) + private static final com.google.firestore.admin.v1.IndexOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.IndexOperationMetadata(); + } + + public static com.google.firestore.admin.v1.IndexOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.IndexOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..4fbed77b4f73 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadataOrBuilder.java @@ -0,0 +1,181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public interface IndexOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.IndexOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The index resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string index = 3; + */ + java.lang.String getIndex(); + /** + * + * + *
+   * The index resource that this operation is acting on. For example:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+   * 
+ * + * string index = 3; + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + int getStateValue(); + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState state = 4; + */ + com.google.firestore.admin.v1.OperationState getState(); + + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + boolean hasProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 5; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder(); + + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + boolean hasProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + com.google.firestore.admin.v1.Progress getProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java new file mode 100644 index 000000000000..ce495b677d7b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java @@ -0,0 +1,185 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/index.proto + +package com.google.firestore.admin.v1; + +public interface IndexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only.
+   * A server defined name for this index.
+   * The form of this name for composite indexes will be:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+   * For single field indexes, this field will be empty.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only.
+   * A server defined name for this index.
+   * The form of this name for composite indexes will be:
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
+   * For single field indexes, this field will be empty.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Indexes with a collection query scope specified allow queries
+   * against a collection that is the child of a specific document, specified at
+   * query time, and that has the same collection id.
+   * Indexes with a collection group query scope specified allow queries against
+   * all collections descended from a specific document, specified at query
+   * time, and that have the same collection id as this index.
+   * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + int getQueryScopeValue(); + /** + * + * + *
+   * Indexes with a collection query scope specified allow queries
+   * against a collection that is the child of a specific document, specified at
+   * query time, and that has the same collection id.
+   * Indexes with a collection group query scope specified allow queries against
+   * all collections descended from a specific document, specified at query
+   * time, and that have the same collection id as this index.
+   * 
+ * + * .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + com.google.firestore.admin.v1.Index.QueryScope getQueryScope(); + + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + java.util.List getFieldsList(); + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + com.google.firestore.admin.v1.Index.IndexField getFields(int index); + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + int getFieldsCount(); + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + java.util.List + getFieldsOrBuilderList(); + /** + * + * + *
+   * The fields supported by this index.
+   * For composite indexes, this is always 2 or more fields.
+   * The last field entry is always for the field path `__name__`. If, on
+   * creation, `__name__` was not specified as the last field, it will be added
+   * automatically with the same direction as that of the last field defined. If
+   * the final field in a composite index is not directional, the `__name__`
+   * will be ordered ASCENDING (unless explicitly specified).
+   * For single field indexes, this will always be exactly one entry with a
+   * field path equal to the field path of the associated field.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilder(int index); + + /** + * + * + *
+   * Output only.
+   * The serving state of the index.
+   * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + int getStateValue(); + /** + * + * + *
+   * Output only.
+   * The serving state of the index.
+   * 
+ * + * .google.firestore.admin.v1.Index.State state = 4; + */ + com.google.firestore.admin.v1.Index.State getState(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java new file mode 100644 index 000000000000..ef5191e5fc23 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/index.proto + +package com.google.firestore.admin.v1; + +public final class IndexProto { + private IndexProto() {} + + 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_admin_v1_Index_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Index_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Index_IndexField_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Index_IndexField_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/admin/v1/index.proto\022" + + "\031google.firestore.admin.v1\032\034google/api/a" + + "nnotations.proto\"\221\005\n\005Index\022\014\n\004name\030\001 \001(\t" + + "\022@\n\013query_scope\030\002 \001(\0162+.google.firestore" + + ".admin.v1.Index.QueryScope\022;\n\006fields\030\003 \003" + + "(\0132+.google.firestore.admin.v1.Index.Ind" + + "exField\0225\n\005state\030\004 \001(\0162&.google.firestor" + + "e.admin.v1.Index.State\032\275\002\n\nIndexField\022\022\n" + + "\nfield_path\030\001 \001(\t\022B\n\005order\030\002 \001(\01621.googl" + + "e.firestore.admin.v1.Index.IndexField.Or" + + "derH\000\022O\n\014array_config\030\003 \001(\01627.google.fir" + + "estore.admin.v1.Index.IndexField.ArrayCo" + + "nfigH\000\"=\n\005Order\022\025\n\021ORDER_UNSPECIFIED\020\000\022\r" + + "\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"9\n\013ArrayCo" + + "nfig\022\034\n\030ARRAY_CONFIG_UNSPECIFIED\020\000\022\014\n\010CO" + + "NTAINS\020\001B\014\n\nvalue_mode\"9\n\nQueryScope\022\033\n\027" + + "QUERY_SCOPE_UNSPECIFIED\020\000\022\016\n\nCOLLECTION\020" + + "\001\"I\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE" + + "ATING\020\001\022\t\n\005READY\020\002\022\020\n\014NEEDS_REPAIR\020\003B\270\001\n" + + "\035com.google.firestore.admin.v1B\nIndexPro" + + "toP\001Z>google.golang.org/genproto/googlea" + + "pis/firestore/admin/v1;admin\242\002\004GCFS\252\002\037Go" + + "ogle.Cloud.Firestore.Admin.V1\312\002\037Google\\C" + + "loud\\Firestore\\Admin\\V1b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_firestore_admin_v1_Index_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_Index_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Index_descriptor, + new java.lang.String[] { + "Name", "QueryScope", "Fields", "State", + }); + internal_static_google_firestore_admin_v1_Index_IndexField_descriptor = + internal_static_google_firestore_admin_v1_Index_descriptor.getNestedTypes().get(0); + internal_static_google_firestore_admin_v1_Index_IndexField_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Index_IndexField_descriptor, + new java.lang.String[] { + "FieldPath", "Order", "ArrayConfig", "ValueMode", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java new file mode 100644 index 000000000000..cc3e7dc8bde8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java @@ -0,0 +1,1049 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListFieldsRequest} + */ +public final class ListFieldsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListFieldsRequest) + ListFieldsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFieldsRequest.newBuilder() to construct. + private ListFieldsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFieldsRequest() { + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListFieldsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListFieldsRequest.class, + com.google.firestore.admin.v1.ListFieldsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The filter to apply to list results. Currently,
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+   * that have been explicitly overridden. To issue this query, call
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+   * `indexConfig.usesAncestorConfig:false`.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter to apply to list results. Currently,
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+   * that have been explicitly overridden. To issue this query, call
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+   * `indexConfig.usesAncestorConfig:false`.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The number of results to return.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.admin.v1.ListFieldsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ListFieldsRequest other = + (com.google.firestore.admin.v1.ListFieldsRequest) obj; + + boolean result = true; + result = result && getParent().equals(other.getParent()); + result = result && getFilter().equals(other.getFilter()); + result = result && (getPageSize() == other.getPageSize()); + result = result && getPageToken().equals(other.getPageToken()); + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ListFieldsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest 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.admin.v1.ListFieldsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest 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.admin.v1.ListFieldsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest 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.admin.v1.ListFieldsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest 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.admin.v1.ListFieldsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest 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.admin.v1.ListFieldsRequest 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 [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListFieldsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ListFieldsRequest) + com.google.firestore.admin.v1.ListFieldsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListFieldsRequest.class, + com.google.firestore.admin.v1.ListFieldsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ListFieldsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ListFieldsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsRequest build() { + com.google.firestore.admin.v1.ListFieldsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsRequest buildPartial() { + com.google.firestore.admin.v1.ListFieldsRequest result = + new com.google.firestore.admin.v1.ListFieldsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ListFieldsRequest) { + return mergeFrom((com.google.firestore.admin.v1.ListFieldsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ListFieldsRequest other) { + if (other == com.google.firestore.admin.v1.ListFieldsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ListFieldsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.ListFieldsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 filter_ = ""; + /** + * + * + *
+     * The filter to apply to list results. Currently,
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter to apply to list results. Currently,
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter to apply to list results. Currently,
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter to apply to list results. Currently,
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter to apply to list results. Currently,
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+     * that have been explicitly overridden. To issue this query, call
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+     * `indexConfig.usesAncestorConfig:false`.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The number of results to return.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The number of results to return.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of results to return.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = 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.admin.v1.ListFieldsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ListFieldsRequest) + private static final com.google.firestore.admin.v1.ListFieldsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ListFieldsRequest(); + } + + public static com.google.firestore.admin.v1.ListFieldsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFieldsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFieldsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java new file mode 100644 index 000000000000..3456c29b4eaa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface ListFieldsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ListFieldsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The filter to apply to list results. Currently,
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+   * that have been explicitly overridden. To issue this query, call
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+   * `indexConfig.usesAncestorConfig:false`.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter to apply to list results. Currently,
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
+   * that have been explicitly overridden. To issue this query, call
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
+   * `indexConfig.usesAncestorConfig:false`.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The number of results to return.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java new file mode 100644 index 000000000000..86c31d29d88d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java @@ -0,0 +1,1096 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListFieldsResponse} + */ +public final class ListFieldsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListFieldsResponse) + ListFieldsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFieldsResponse.newBuilder() to construct. + private ListFieldsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFieldsResponse() { + fields_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListFieldsResponse( + 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)) { + fields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fields_.add( + input.readMessage( + com.google.firestore.admin.v1.Field.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListFieldsResponse.class, + com.google.firestore.admin.v1.ListFieldsResponse.Builder.class); + } + + private int bitField0_; + public static final int FIELDS_FIELD_NUMBER = 1; + private java.util.List fields_; + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public java.util.List getFieldsList() { + return fields_; + } + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public int getFieldsCount() { + return fields_.size(); + } + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.Field getFields(int index) { + return fields_.get(index); + } + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.admin.v1.ListFieldsResponse)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ListFieldsResponse other = + (com.google.firestore.admin.v1.ListFieldsResponse) obj; + + boolean result = true; + result = result && getFieldsList().equals(other.getFieldsList()); + result = result && getNextPageToken().equals(other.getNextPageToken()); + 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 (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ListFieldsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse 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.admin.v1.ListFieldsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse 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.admin.v1.ListFieldsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse 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.admin.v1.ListFieldsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse 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.admin.v1.ListFieldsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse 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.admin.v1.ListFieldsResponse 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 [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListFieldsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ListFieldsResponse) + com.google.firestore.admin.v1.ListFieldsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListFieldsResponse.class, + com.google.firestore.admin.v1.ListFieldsResponse.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ListFieldsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListFieldsResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsResponse getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ListFieldsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsResponse build() { + com.google.firestore.admin.v1.ListFieldsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsResponse buildPartial() { + com.google.firestore.admin.v1.ListFieldsResponse result = + new com.google.firestore.admin.v1.ListFieldsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ListFieldsResponse) { + return mergeFrom((com.google.firestore.admin.v1.ListFieldsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ListFieldsResponse other) { + if (other == com.google.firestore.admin.v1.ListFieldsResponse.getDefaultInstance()) + return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ListFieldsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.ListFieldsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Field, + com.google.firestore.admin.v1.Field.Builder, + com.google.firestore.admin.v1.FieldOrBuilder> + fieldsBuilder_; + + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.Field getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder setFields(int index, com.google.firestore.admin.v1.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder setFields( + int index, com.google.firestore.admin.v1.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder addFields(com.google.firestore.admin.v1.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder addFields(int index, com.google.firestore.admin.v1.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder addFields(com.google.firestore.admin.v1.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder addFields( + int index, com.google.firestore.admin.v1.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.Field.Builder getFieldsBuilder(int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.Field.Builder addFieldsBuilder() { + return getFieldsFieldBuilder() + .addBuilder(com.google.firestore.admin.v1.Field.getDefaultInstance()); + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public com.google.firestore.admin.v1.Field.Builder addFieldsBuilder(int index) { + return getFieldsFieldBuilder() + .addBuilder(index, com.google.firestore.admin.v1.Field.getDefaultInstance()); + } + /** + * + * + *
+     * The requested fields.
+     * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + public java.util.List getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Field, + com.google.firestore.admin.v1.Field.Builder, + com.google.firestore.admin.v1.FieldOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Field, + com.google.firestore.admin.v1.Field.Builder, + com.google.firestore.admin.v1.FieldOrBuilder>( + fields_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = 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.admin.v1.ListFieldsResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ListFieldsResponse) + private static final com.google.firestore.admin.v1.ListFieldsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ListFieldsResponse(); + } + + public static com.google.firestore.admin.v1.ListFieldsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFieldsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFieldsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListFieldsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java new file mode 100644 index 000000000000..95251958ebf3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponseOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface ListFieldsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ListFieldsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + java.util.List getFieldsList(); + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + com.google.firestore.admin.v1.Field getFields(int index); + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + int getFieldsCount(); + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + java.util.List getFieldsOrBuilderList(); + /** + * + * + *
+   * The requested fields.
+   * 
+ * + * repeated .google.firestore.admin.v1.Field fields = 1; + */ + com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index); + + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java new file mode 100644 index 000000000000..7ae03770204e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java @@ -0,0 +1,1021 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListIndexesRequest} + */ +public final class ListIndexesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListIndexesRequest) + ListIndexesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIndexesRequest.newBuilder() to construct. + private ListIndexesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIndexesRequest() { + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListIndexesRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListIndexesRequest.class, + com.google.firestore.admin.v1.ListIndexesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The filter to apply to list results.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter to apply to list results.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The number of results to return.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.admin.v1.ListIndexesRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ListIndexesRequest other = + (com.google.firestore.admin.v1.ListIndexesRequest) obj; + + boolean result = true; + result = result && getParent().equals(other.getParent()); + result = result && getFilter().equals(other.getFilter()); + result = result && (getPageSize() == other.getPageSize()); + result = result && getPageToken().equals(other.getPageToken()); + 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ListIndexesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest 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.admin.v1.ListIndexesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest 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.admin.v1.ListIndexesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest 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.admin.v1.ListIndexesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest 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.admin.v1.ListIndexesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest 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.admin.v1.ListIndexesRequest 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 [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListIndexesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ListIndexesRequest) + com.google.firestore.admin.v1.ListIndexesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListIndexesRequest.class, + com.google.firestore.admin.v1.ListIndexesRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ListIndexesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ListIndexesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesRequest build() { + com.google.firestore.admin.v1.ListIndexesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesRequest buildPartial() { + com.google.firestore.admin.v1.ListIndexesRequest result = + new com.google.firestore.admin.v1.ListIndexesRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ListIndexesRequest) { + return mergeFrom((com.google.firestore.admin.v1.ListIndexesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ListIndexesRequest other) { + if (other == com.google.firestore.admin.v1.ListIndexesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ListIndexesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.ListIndexesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * A parent name of the form
+     * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 filter_ = ""; + /** + * + * + *
+     * The filter to apply to list results.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter to apply to list results.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter to apply to list results.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter to apply to list results.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter to apply to list results.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The number of results to return.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The number of results to return.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of results to return.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, returned from a previous call to
+     * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+     * page of results.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = 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.admin.v1.ListIndexesRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ListIndexesRequest) + private static final com.google.firestore.admin.v1.ListIndexesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ListIndexesRequest(); + } + + public static com.google.firestore.admin.v1.ListIndexesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIndexesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListIndexesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java new file mode 100644 index 000000000000..f12656278692 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequestOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface ListIndexesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ListIndexesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * A parent name of the form
+   * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The filter to apply to list results.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter to apply to list results.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The number of results to return.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, returned from a previous call to
+   * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next
+   * page of results.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java new file mode 100644 index 000000000000..f53c26194814 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java @@ -0,0 +1,1097 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListIndexesResponse} + */ +public final class ListIndexesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.ListIndexesResponse) + ListIndexesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIndexesResponse.newBuilder() to construct. + private ListIndexesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIndexesResponse() { + indexes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListIndexesResponse( + 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)) { + indexes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + indexes_.add( + input.readMessage( + com.google.firestore.admin.v1.Index.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + indexes_ = java.util.Collections.unmodifiableList(indexes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListIndexesResponse.class, + com.google.firestore.admin.v1.ListIndexesResponse.Builder.class); + } + + private int bitField0_; + public static final int INDEXES_FIELD_NUMBER = 1; + private java.util.List indexes_; + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List getIndexesList() { + return indexes_; + } + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List + getIndexesOrBuilderList() { + return indexes_; + } + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public int getIndexesCount() { + return indexes_.size(); + } + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index getIndexes(int index) { + return indexes_.get(index); + } + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index) { + return indexes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < indexes_.size(); i++) { + output.writeMessage(1, indexes_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < indexes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexes_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.admin.v1.ListIndexesResponse)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.ListIndexesResponse other = + (com.google.firestore.admin.v1.ListIndexesResponse) obj; + + boolean result = true; + result = result && getIndexesList().equals(other.getIndexesList()); + result = result && getNextPageToken().equals(other.getNextPageToken()); + 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 (getIndexesCount() > 0) { + hash = (37 * hash) + INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getIndexesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.ListIndexesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse 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.admin.v1.ListIndexesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse 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.admin.v1.ListIndexesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse 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.admin.v1.ListIndexesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse 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.admin.v1.ListIndexesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse 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.admin.v1.ListIndexesResponse 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 [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.ListIndexesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.ListIndexesResponse) + com.google.firestore.admin.v1.ListIndexesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.ListIndexesResponse.class, + com.google.firestore.admin.v1.ListIndexesResponse.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.ListIndexesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIndexesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (indexesBuilder_ == null) { + indexes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + indexesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_ListIndexesResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesResponse getDefaultInstanceForType() { + return com.google.firestore.admin.v1.ListIndexesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesResponse build() { + com.google.firestore.admin.v1.ListIndexesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesResponse buildPartial() { + com.google.firestore.admin.v1.ListIndexesResponse result = + new com.google.firestore.admin.v1.ListIndexesResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (indexesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + indexes_ = java.util.Collections.unmodifiableList(indexes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indexes_ = indexes_; + } else { + result.indexes_ = indexesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.ListIndexesResponse) { + return mergeFrom((com.google.firestore.admin.v1.ListIndexesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.ListIndexesResponse other) { + if (other == com.google.firestore.admin.v1.ListIndexesResponse.getDefaultInstance()) + return this; + if (indexesBuilder_ == null) { + if (!other.indexes_.isEmpty()) { + if (indexes_.isEmpty()) { + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndexesIsMutable(); + indexes_.addAll(other.indexes_); + } + onChanged(); + } + } else { + if (!other.indexes_.isEmpty()) { + if (indexesBuilder_.isEmpty()) { + indexesBuilder_.dispose(); + indexesBuilder_ = null; + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + indexesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndexesFieldBuilder() + : null; + } else { + indexesBuilder_.addAllMessages(other.indexes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.ListIndexesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.admin.v1.ListIndexesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List indexes_ = + java.util.Collections.emptyList(); + + private void ensureIndexesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + indexes_ = new java.util.ArrayList(indexes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + indexesBuilder_; + + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List getIndexesList() { + if (indexesBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexes_); + } else { + return indexesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public int getIndexesCount() { + if (indexesBuilder_ == null) { + return indexes_.size(); + } else { + return indexesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index getIndexes(int index) { + if (indexesBuilder_ == null) { + return indexes_.get(index); + } else { + return indexesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder setIndexes(int index, com.google.firestore.admin.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.set(index, value); + onChanged(); + } else { + indexesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder setIndexes( + int index, com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.set(index, builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes(com.google.firestore.admin.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.add(value); + onChanged(); + } else { + indexesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes(int index, com.google.firestore.admin.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.add(index, value); + onChanged(); + } else { + indexesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes(com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addIndexes( + int index, com.google.firestore.admin.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(index, builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder addAllIndexes( + java.lang.Iterable values) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexes_); + onChanged(); + } else { + indexesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder clearIndexes() { + if (indexesBuilder_ == null) { + indexes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + indexesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public Builder removeIndexes(int index) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.remove(index); + onChanged(); + } else { + indexesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index.Builder getIndexesBuilder(int index) { + return getIndexesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index) { + if (indexesBuilder_ == null) { + return indexes_.get(index); + } else { + return indexesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List + getIndexesOrBuilderList() { + if (indexesBuilder_ != null) { + return indexesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexes_); + } + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder() { + return getIndexesFieldBuilder() + .addBuilder(com.google.firestore.admin.v1.Index.getDefaultInstance()); + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public com.google.firestore.admin.v1.Index.Builder addIndexesBuilder(int index) { + return getIndexesFieldBuilder() + .addBuilder(index, com.google.firestore.admin.v1.Index.getDefaultInstance()); + } + /** + * + * + *
+     * The requested indexes.
+     * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + public java.util.List getIndexesBuilderList() { + return getIndexesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder> + getIndexesFieldBuilder() { + if (indexesBuilder_ == null) { + indexesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.admin.v1.Index, + com.google.firestore.admin.v1.Index.Builder, + com.google.firestore.admin.v1.IndexOrBuilder>( + indexes_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + indexes_ = null; + } + return indexesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that may be used to request another page of results. If blank,
+     * this is the last page.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = 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.admin.v1.ListIndexesResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.ListIndexesResponse) + private static final com.google.firestore.admin.v1.ListIndexesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.ListIndexesResponse(); + } + + public static com.google.firestore.admin.v1.ListIndexesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIndexesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListIndexesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.ListIndexesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java new file mode 100644 index 000000000000..84c68c85e704 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponseOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface ListIndexesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.ListIndexesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + java.util.List getIndexesList(); + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + com.google.firestore.admin.v1.Index getIndexes(int index); + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + int getIndexesCount(); + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + java.util.List getIndexesOrBuilderList(); + /** + * + * + *
+   * The requested indexes.
+   * 
+ * + * repeated .google.firestore.admin.v1.Index indexes = 1; + */ + com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index); + + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A page token that may be used to request another page of results. If blank,
+   * this is the last page.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java new file mode 100644 index 000000000000..8e609d46c228 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadata.java @@ -0,0 +1,434 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/location.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.LocationMetadata} + */ +public final class LocationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.LocationMetadata) + LocationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationMetadata.newBuilder() to construct. + private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LocationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + 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.admin.v1.LocationProto + .internal_static_google_firestore_admin_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.LocationProto + .internal_static_google_firestore_admin_v1_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.LocationMetadata.class, + com.google.firestore.admin.v1.LocationMetadata.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.admin.v1.LocationMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.LocationMetadata other = + (com.google.firestore.admin.v1.LocationMetadata) obj; + + boolean result = true; + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.LocationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.LocationMetadata 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.admin.v1.LocationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.LocationMetadata 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.admin.v1.LocationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.LocationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.LocationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.LocationMetadata 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.admin.v1.LocationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.LocationMetadata 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.admin.v1.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.LocationMetadata 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.admin.v1.LocationMetadata 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 metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.LocationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.LocationMetadata) + com.google.firestore.admin.v1.LocationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.LocationProto + .internal_static_google_firestore_admin_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.LocationProto + .internal_static_google_firestore_admin_v1_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.LocationMetadata.class, + com.google.firestore.admin.v1.LocationMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.LocationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.LocationProto + .internal_static_google_firestore_admin_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.LocationMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.LocationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.LocationMetadata build() { + com.google.firestore.admin.v1.LocationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.LocationMetadata buildPartial() { + com.google.firestore.admin.v1.LocationMetadata result = + new com.google.firestore.admin.v1.LocationMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.LocationMetadata) { + return mergeFrom((com.google.firestore.admin.v1.LocationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.LocationMetadata other) { + if (other == com.google.firestore.admin.v1.LocationMetadata.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.LocationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.LocationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.admin.v1.LocationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.LocationMetadata) + private static final com.google.firestore.admin.v1.LocationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.LocationMetadata(); + } + + public static com.google.firestore.admin.v1.LocationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.LocationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java new file mode 100644 index 000000000000..d2dbd814a6a4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationMetadataOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/location.proto + +package com.google.firestore.admin.v1; + +public interface LocationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.LocationMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java new file mode 100644 index 000000000000..47d7b90ffcc5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/LocationProto.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/location.proto + +package com.google.firestore.admin.v1; + +public final class LocationProto { + private LocationProto() {} + + 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_admin_v1_LocationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_LocationMetadata_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/admin/v1/location.pro" + + "to\022\031google.firestore.admin.v1\032\030google/ty" + + "pe/latlng.proto\032\034google/api/annotations." + + "proto\"\022\n\020LocationMetadataB\273\001\n\035com.google" + + ".firestore.admin.v1B\rLocationProtoP\001Z>go" + + "ogle.golang.org/genproto/googleapis/fire" + + "store/admin/v1;admin\242\002\004GCFS\252\002\037Google.Clo" + + "ud.Firestore.Admin.V1\312\002\037Google\\Cloud\\Fir" + + "estore\\Admin\\V1b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.type.LatLngProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_firestore_admin_v1_LocationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_LocationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_LocationMetadata_descriptor, + new java.lang.String[] {}); + com.google.type.LatLngProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java new file mode 100644 index 000000000000..6ab4f963e23d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java @@ -0,0 +1,210 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public final class OperationProto { + private OperationProto() {} + + 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_admin_v1_IndexOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_IndexOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_FieldOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_ExportDocumentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_Progress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_Progress_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/admin/v1/operation.pr" + + "oto\022\031google.firestore.admin.v1\032%google/f" + + "irestore/admin/v1/index.proto\032\037google/pr" + + "otobuf/timestamp.proto\032\034google/api/annot" + + "ations.proto\"\275\002\n\026IndexOperationMetadata\022" + + ".\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022,\n\010end_time\030\002 \001(\0132\032.google.proto" + + "buf.Timestamp\022\r\n\005index\030\003 \001(\t\0228\n\005state\030\004 " + + "\001(\0162).google.firestore.admin.v1.Operatio" + + "nState\022?\n\022progress_documents\030\005 \001(\0132#.goo" + + "gle.firestore.admin.v1.Progress\022;\n\016progr" + + "ess_bytes\030\006 \001(\0132#.google.firestore.admin" + + ".v1.Progress\"\210\005\n\026FieldOperationMetadata\022" + + ".\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022,\n\010end_time\030\002 \001(\0132\032.google.proto" + + "buf.Timestamp\022\r\n\005field\030\003 \001(\t\022_\n\023index_co" + + "nfig_deltas\030\004 \003(\0132B.google.firestore.adm" + + "in.v1.FieldOperationMetadata.IndexConfig" + + "Delta\0228\n\005state\030\005 \001(\0162).google.firestore." + + "admin.v1.OperationState\022?\n\022progress_docu" + + "ments\030\006 \001(\0132#.google.firestore.admin.v1." + + "Progress\022;\n\016progress_bytes\030\007 \001(\0132#.googl" + + "e.firestore.admin.v1.Progress\032\347\001\n\020IndexC" + + "onfigDelta\022b\n\013change_type\030\001 \001(\0162M.google" + + ".firestore.admin.v1.FieldOperationMetada" + + "ta.IndexConfigDelta.ChangeType\022/\n\005index\030" + + "\002 \001(\0132 .google.firestore.admin.v1.Index\"" + + ">\n\nChangeType\022\033\n\027CHANGE_TYPE_UNSPECIFIED" + + "\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\"\354\002\n\027ExportDocume" + + "ntsMetadata\022.\n\nstart_time\030\001 \001(\0132\032.google" + + ".protobuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032." + + "google.protobuf.Timestamp\022B\n\017operation_s" + + "tate\030\003 \001(\0162).google.firestore.admin.v1.O" + + "perationState\022?\n\022progress_documents\030\004 \001(" + + "\0132#.google.firestore.admin.v1.Progress\022;" + + "\n\016progress_bytes\030\005 \001(\0132#.google.firestor" + + "e.admin.v1.Progress\022\026\n\016collection_ids\030\006 " + + "\003(\t\022\031\n\021output_uri_prefix\030\007 \001(\t\"\353\002\n\027Impor" + + "tDocumentsMetadata\022.\n\nstart_time\030\001 \001(\0132\032" + + ".google.protobuf.Timestamp\022,\n\010end_time\030\002" + + " \001(\0132\032.google.protobuf.Timestamp\022B\n\017oper" + + "ation_state\030\003 \001(\0162).google.firestore.adm" + + "in.v1.OperationState\022?\n\022progress_documen" + + "ts\030\004 \001(\0132#.google.firestore.admin.v1.Pro" + + "gress\022;\n\016progress_bytes\030\005 \001(\0132#.google.f" + + "irestore.admin.v1.Progress\022\026\n\016collection" + + "_ids\030\006 \003(\t\022\030\n\020input_uri_prefix\030\007 \001(\t\"4\n\027" + + "ExportDocumentsResponse\022\031\n\021output_uri_pr" + + "efix\030\001 \001(\t\":\n\010Progress\022\026\n\016estimated_work" + + "\030\001 \001(\003\022\026\n\016completed_work\030\002 \001(\003*\236\001\n\016Opera" + + "tionState\022\037\n\033OPERATION_STATE_UNSPECIFIED" + + "\020\000\022\020\n\014INITIALIZING\020\001\022\016\n\nPROCESSING\020\002\022\016\n\n" + + "CANCELLING\020\003\022\016\n\nFINALIZING\020\004\022\016\n\nSUCCESSF" + + "UL\020\005\022\n\n\006FAILED\020\006\022\r\n\tCANCELLED\020\007B\274\001\n\035com." + + "google.firestore.admin.v1B\016OperationProt" + + "oP\001Z>google.golang.org/genproto/googleap" + + "is/firestore/admin/v1;admin\242\002\004GCFS\252\002\037Goo" + + "gle.Cloud.Firestore.Admin.V1\312\002\037Google\\Cl" + + "oud\\Firestore\\Admin\\V1b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.firestore.admin.v1.IndexProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_firestore_admin_v1_IndexOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor, + new java.lang.String[] { + "StartTime", "EndTime", "Index", "State", "ProgressDocuments", "ProgressBytes", + }); + internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_firestore_admin_v1_FieldOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor, + new java.lang.String[] { + "StartTime", + "EndTime", + "Field", + "IndexConfigDeltas", + "State", + "ProgressDocuments", + "ProgressBytes", + }); + internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_descriptor = + internal_static_google_firestore_admin_v1_FieldOperationMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_FieldOperationMetadata_IndexConfigDelta_descriptor, + new java.lang.String[] { + "ChangeType", "Index", + }); + internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor, + new java.lang.String[] { + "StartTime", + "EndTime", + "OperationState", + "ProgressDocuments", + "ProgressBytes", + "CollectionIds", + "OutputUriPrefix", + }); + internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor, + new java.lang.String[] { + "StartTime", + "EndTime", + "OperationState", + "ProgressDocuments", + "ProgressBytes", + "CollectionIds", + "InputUriPrefix", + }); + internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_firestore_admin_v1_ExportDocumentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor, + new java.lang.String[] { + "OutputUriPrefix", + }); + internal_static_google_firestore_admin_v1_Progress_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_firestore_admin_v1_Progress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_Progress_descriptor, + new java.lang.String[] { + "EstimatedWork", "CompletedWork", + }); + com.google.firestore.admin.v1.IndexProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java new file mode 100644 index 000000000000..c67fa8148333 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java @@ -0,0 +1,263 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Describes the state of the operation.
+ * 
+ * + * Protobuf enum {@code google.firestore.admin.v1.OperationState} + */ +public enum OperationState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * OPERATION_STATE_UNSPECIFIED = 0; + */ + OPERATION_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * Request is being prepared for processing.
+   * 
+ * + * INITIALIZING = 1; + */ + INITIALIZING(1), + /** + * + * + *
+   * Request is actively being processed.
+   * 
+ * + * PROCESSING = 2; + */ + PROCESSING(2), + /** + * + * + *
+   * Request is in the process of being cancelled after user called
+   * google.longrunning.Operations.CancelOperation on the operation.
+   * 
+ * + * CANCELLING = 3; + */ + CANCELLING(3), + /** + * + * + *
+   * Request has been processed and is in its finalization stage.
+   * 
+ * + * FINALIZING = 4; + */ + FINALIZING(4), + /** + * + * + *
+   * Request has completed successfully.
+   * 
+ * + * SUCCESSFUL = 5; + */ + SUCCESSFUL(5), + /** + * + * + *
+   * Request has finished being processed, but encountered an error.
+   * 
+ * + * FAILED = 6; + */ + FAILED(6), + /** + * + * + *
+   * Request has finished being cancelled after user called
+   * google.longrunning.Operations.CancelOperation.
+   * 
+ * + * CANCELLED = 7; + */ + CANCELLED(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * OPERATION_STATE_UNSPECIFIED = 0; + */ + public static final int OPERATION_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Request is being prepared for processing.
+   * 
+ * + * INITIALIZING = 1; + */ + public static final int INITIALIZING_VALUE = 1; + /** + * + * + *
+   * Request is actively being processed.
+   * 
+ * + * PROCESSING = 2; + */ + public static final int PROCESSING_VALUE = 2; + /** + * + * + *
+   * Request is in the process of being cancelled after user called
+   * google.longrunning.Operations.CancelOperation on the operation.
+   * 
+ * + * CANCELLING = 3; + */ + public static final int CANCELLING_VALUE = 3; + /** + * + * + *
+   * Request has been processed and is in its finalization stage.
+   * 
+ * + * FINALIZING = 4; + */ + public static final int FINALIZING_VALUE = 4; + /** + * + * + *
+   * Request has completed successfully.
+   * 
+ * + * SUCCESSFUL = 5; + */ + public static final int SUCCESSFUL_VALUE = 5; + /** + * + * + *
+   * Request has finished being processed, but encountered an error.
+   * 
+ * + * FAILED = 6; + */ + public static final int FAILED_VALUE = 6; + /** + * + * + *
+   * Request has finished being cancelled after user called
+   * google.longrunning.Operations.CancelOperation.
+   * 
+ * + * CANCELLED = 7; + */ + public static final int CANCELLED_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static OperationState valueOf(int value) { + return forNumber(value); + } + + public static OperationState forNumber(int value) { + switch (value) { + case 0: + return OPERATION_STATE_UNSPECIFIED; + case 1: + return INITIALIZING; + case 2: + return PROCESSING; + case 3: + return CANCELLING; + case 4: + return FINALIZING; + case 5: + return SUCCESSFUL; + case 6: + return FAILED; + case 7: + return CANCELLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OperationState findValueByNumber(int number) { + return OperationState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto.getDescriptor().getEnumTypes().get(0); + } + + private static final OperationState[] VALUES = values(); + + public static OperationState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OperationState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.OperationState) +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ParentName.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ParentName.java new file mode 100644 index 000000000000..55ddd317273b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ParentName.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.admin.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 ParentName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/collectionGroups/{collection_id}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String database; + private final String collectionId; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getCollectionId() { + return collectionId; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ParentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + database = Preconditions.checkNotNull(builder.getDatabase()); + collectionId = Preconditions.checkNotNull(builder.getCollectionId()); + } + + public static ParentName of(String project, String database, String collectionId) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setCollectionId(collectionId) + .build(); + } + + public static String format(String project, String database, String collectionId) { + return newBuilder() + .setProject(project) + .setDatabase(database) + .setCollectionId(collectionId) + .build() + .toString(); + } + + public static ParentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ParentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("database"), matchMap.get("collection_id")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (ParentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("database", database); + fieldMapBuilder.put("collectionId", collectionId); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "database", database, "collection_id", collectionId); + } + + /** Builder for ParentName. */ + public static class Builder { + + private String project; + private String database; + private String collectionId; + + public String getProject() { + return project; + } + + public String getDatabase() { + return database; + } + + public String getCollectionId() { + return collectionId; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDatabase(String database) { + this.database = database; + return this; + } + + public Builder setCollectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + + private Builder() {} + + private Builder(ParentName parentName) { + project = parentName.project; + database = parentName.database; + collectionId = parentName.collectionId; + } + + public ParentName build() { + return new ParentName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ParentName) { + ParentName that = (ParentName) o; + return (this.project.equals(that.project)) + && (this.database.equals(that.database)) + && (this.collectionId.equals(that.collectionId)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= database.hashCode(); + h *= 1000003; + h ^= collectionId.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java new file mode 100644 index 000000000000..b68e086dee42 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Describes the progress of the operation.
+ * Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress]
+ * is used.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Progress} + */ +public final class Progress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Progress) + ProgressOrBuilder { + private static final long serialVersionUID = 0L; + // Use Progress.newBuilder() to construct. + private Progress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Progress() { + estimatedWork_ = 0L; + completedWork_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Progress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + estimatedWork_ = input.readInt64(); + break; + } + case 16: + { + completedWork_ = input.readInt64(); + 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.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_Progress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_Progress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Progress.class, + com.google.firestore.admin.v1.Progress.Builder.class); + } + + public static final int ESTIMATED_WORK_FIELD_NUMBER = 1; + private long estimatedWork_; + /** + * + * + *
+   * The amount of work estimated.
+   * 
+ * + * int64 estimated_work = 1; + */ + public long getEstimatedWork() { + return estimatedWork_; + } + + public static final int COMPLETED_WORK_FIELD_NUMBER = 2; + private long completedWork_; + /** + * + * + *
+   * The amount of work completed.
+   * 
+ * + * int64 completed_work = 2; + */ + public long getCompletedWork() { + return completedWork_; + } + + 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 (estimatedWork_ != 0L) { + output.writeInt64(1, estimatedWork_); + } + if (completedWork_ != 0L) { + output.writeInt64(2, completedWork_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (estimatedWork_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, estimatedWork_); + } + if (completedWork_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, completedWork_); + } + 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.admin.v1.Progress)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.Progress other = (com.google.firestore.admin.v1.Progress) obj; + + boolean result = true; + result = result && (getEstimatedWork() == other.getEstimatedWork()); + result = result && (getCompletedWork() == other.getCompletedWork()); + 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) + ESTIMATED_WORK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEstimatedWork()); + hash = (37 * hash) + COMPLETED_WORK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCompletedWork()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.Progress parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Progress 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.admin.v1.Progress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Progress 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.admin.v1.Progress parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.Progress parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.Progress parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Progress 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.admin.v1.Progress parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Progress 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.admin.v1.Progress parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.Progress 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.admin.v1.Progress prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes the progress of the operation.
+   * Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress]
+   * is used.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.Progress} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Progress) + com.google.firestore.admin.v1.ProgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_Progress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_Progress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.Progress.class, + com.google.firestore.admin.v1.Progress.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.Progress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + estimatedWork_ = 0L; + + completedWork_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_Progress_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Progress getDefaultInstanceForType() { + return com.google.firestore.admin.v1.Progress.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.Progress build() { + com.google.firestore.admin.v1.Progress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Progress buildPartial() { + com.google.firestore.admin.v1.Progress result = + new com.google.firestore.admin.v1.Progress(this); + result.estimatedWork_ = estimatedWork_; + result.completedWork_ = completedWork_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.Progress) { + return mergeFrom((com.google.firestore.admin.v1.Progress) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.Progress other) { + if (other == com.google.firestore.admin.v1.Progress.getDefaultInstance()) return this; + if (other.getEstimatedWork() != 0L) { + setEstimatedWork(other.getEstimatedWork()); + } + if (other.getCompletedWork() != 0L) { + setCompletedWork(other.getCompletedWork()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.Progress parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.Progress) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long estimatedWork_; + /** + * + * + *
+     * The amount of work estimated.
+     * 
+ * + * int64 estimated_work = 1; + */ + public long getEstimatedWork() { + return estimatedWork_; + } + /** + * + * + *
+     * The amount of work estimated.
+     * 
+ * + * int64 estimated_work = 1; + */ + public Builder setEstimatedWork(long value) { + + estimatedWork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The amount of work estimated.
+     * 
+ * + * int64 estimated_work = 1; + */ + public Builder clearEstimatedWork() { + + estimatedWork_ = 0L; + onChanged(); + return this; + } + + private long completedWork_; + /** + * + * + *
+     * The amount of work completed.
+     * 
+ * + * int64 completed_work = 2; + */ + public long getCompletedWork() { + return completedWork_; + } + /** + * + * + *
+     * The amount of work completed.
+     * 
+ * + * int64 completed_work = 2; + */ + public Builder setCompletedWork(long value) { + + completedWork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The amount of work completed.
+     * 
+ * + * int64 completed_work = 2; + */ + public Builder clearCompletedWork() { + + completedWork_ = 0L; + 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.admin.v1.Progress) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Progress) + private static final com.google.firestore.admin.v1.Progress DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Progress(); + } + + public static com.google.firestore.admin.v1.Progress getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Progress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Progress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.Progress getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java new file mode 100644 index 000000000000..5eeffb29ca97 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ProgressOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/operation.proto + +package com.google.firestore.admin.v1; + +public interface ProgressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Progress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The amount of work estimated.
+   * 
+ * + * int64 estimated_work = 1; + */ + long getEstimatedWork(); + + /** + * + * + *
+   * The amount of work completed.
+   * 
+ * + * int64 completed_work = 2; + */ + long getCompletedWork(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java new file mode 100644 index 000000000000..347c7e881f9a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java @@ -0,0 +1,969 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.UpdateFieldRequest} + */ +public final class UpdateFieldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.UpdateFieldRequest) + UpdateFieldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFieldRequest.newBuilder() to construct. + private UpdateFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFieldRequest() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateFieldRequest( + 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.admin.v1.Field.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = + input.readMessage( + com.google.firestore.admin.v1.Field.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = 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.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_UpdateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.UpdateFieldRequest.class, + com.google.firestore.admin.v1.UpdateFieldRequest.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.firestore.admin.v1.Field field_; + /** + * + * + *
+   * The field to be updated.
+   * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public boolean hasField() { + return field_ != null; + } + /** + * + * + *
+   * The field to be updated.
+   * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public com.google.firestore.admin.v1.Field getField() { + return field_ == null ? com.google.firestore.admin.v1.Field.getDefaultInstance() : field_; + } + /** + * + * + *
+   * The field to be updated.
+   * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * A mask, relative to the field. If specified, only configuration specified
+   * by this field_mask will be updated in the field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * A mask, relative to the field. If specified, only configuration specified
+   * by this field_mask will be updated in the field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * A mask, relative to the field. If specified, only configuration specified
+   * by this field_mask will be updated in the field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.admin.v1.UpdateFieldRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.UpdateFieldRequest other = + (com.google.firestore.admin.v1.UpdateFieldRequest) obj; + + boolean result = true; + result = result && (hasField() == other.hasField()); + if (hasField()) { + result = result && getField().equals(other.getField()); + } + result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask()) { + result = result && getUpdateMask().equals(other.getUpdateMask()); + } + 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 (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest 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.admin.v1.UpdateFieldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest 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.admin.v1.UpdateFieldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest 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.admin.v1.UpdateFieldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest 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.admin.v1.UpdateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest 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.admin.v1.UpdateFieldRequest 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 [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.UpdateFieldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.UpdateFieldRequest) + com.google.firestore.admin.v1.UpdateFieldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_UpdateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.UpdateFieldRequest.class, + com.google.firestore.admin.v1.UpdateFieldRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.UpdateFieldRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_UpdateFieldRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UpdateFieldRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.UpdateFieldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.UpdateFieldRequest build() { + com.google.firestore.admin.v1.UpdateFieldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UpdateFieldRequest buildPartial() { + com.google.firestore.admin.v1.UpdateFieldRequest result = + new com.google.firestore.admin.v1.UpdateFieldRequest(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.admin.v1.UpdateFieldRequest) { + return mergeFrom((com.google.firestore.admin.v1.UpdateFieldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.UpdateFieldRequest other) { + if (other == com.google.firestore.admin.v1.UpdateFieldRequest.getDefaultInstance()) + return this; + if (other.hasField()) { + mergeField(other.getField()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.admin.v1.UpdateFieldRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.admin.v1.UpdateFieldRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.firestore.admin.v1.Field field_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Field, + com.google.firestore.admin.v1.Field.Builder, + com.google.firestore.admin.v1.FieldOrBuilder> + fieldBuilder_; + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public com.google.firestore.admin.v1.Field getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.firestore.admin.v1.Field.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public Builder setField(com.google.firestore.admin.v1.Field value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public Builder setField(com.google.firestore.admin.v1.Field.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public Builder mergeField(com.google.firestore.admin.v1.Field value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.firestore.admin.v1.Field.newBuilder(field_) + .mergeFrom(value) + .buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public com.google.firestore.admin.v1.Field.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? com.google.firestore.admin.v1.Field.getDefaultInstance() : field_; + } + } + /** + * + * + *
+     * The field to be updated.
+     * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Field, + com.google.firestore.admin.v1.Field.Builder, + com.google.firestore.admin.v1.FieldOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Field, + com.google.firestore.admin.v1.Field.Builder, + com.google.firestore.admin.v1.FieldOrBuilder>( + getField(), getParentForChildren(), isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * A mask, relative to the field. If specified, only configuration specified
+     * by this field_mask will be updated in the field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.admin.v1.UpdateFieldRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.UpdateFieldRequest) + private static final com.google.firestore.admin.v1.UpdateFieldRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.UpdateFieldRequest(); + } + + public static com.google.firestore.admin.v1.UpdateFieldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFieldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateFieldRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.admin.v1.UpdateFieldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java new file mode 100644 index 000000000000..802bd7622410 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequestOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/admin/v1/firestore_admin.proto + +package com.google.firestore.admin.v1; + +public interface UpdateFieldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.UpdateFieldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The field to be updated.
+   * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + boolean hasField(); + /** + * + * + *
+   * The field to be updated.
+   * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + com.google.firestore.admin.v1.Field getField(); + /** + * + * + *
+   * The field to be updated.
+   * 
+ * + * .google.firestore.admin.v1.Field field = 1; + */ + com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder(); + + /** + * + * + *
+   * A mask, relative to the field. If specified, only configuration specified
+   * by this field_mask will be updated in the field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * A mask, relative to the field. If specified, only configuration specified
+   * by this field_mask will be updated in the field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * A mask, relative to the field. If specified, only configuration specified
+   * by this field_mask will be updated in the field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto new file mode 100644 index 000000000000..a24e1aaf1dc4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto @@ -0,0 +1,96 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. +// + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/firestore/admin/v1/index.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "FieldProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; + + +// Represents a single field in the database. +// +// Fields are grouped by their "Collection Group", which represent all +// collections in the database with the same id. +message Field { + // The index configuration for this field. + message IndexConfig { + // The indexes supported for this field. + repeated Index indexes = 1; + + // Output only. + // When true, the `Field`'s index configuration is set from the + // configuration specified by the `ancestor_field`. + // When false, the `Field`'s index configuration is defined explicitly. + bool uses_ancestor_config = 2; + + // Output only. + // Specifies the resource name of the `Field` from which this field's + // index configuration is set (when `uses_ancestor_config` is true), + // or from which it *would* be set if this field had no index configuration + // (when `uses_ancestor_config` is false). + string ancestor_field = 3; + + // Output only + // When true, the `Field`'s index configuration is in the process of being + // reverted. Once complete, the index config will transition to the same + // state as the field specified by `ancestor_field`, at which point + // `uses_ancestor_config` will be `true` and `reverting` will be `false`. + bool reverting = 4; + } + + // A field name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + // + // A field path may be a simple field name, e.g. `address` or a path to fields + // within map_value , e.g. `address.city`, + // or a special field path. The only valid special field is `*`, which + // represents any field. + // + // Field paths may be quoted using ` (backtick). The only character that needs + // to be escaped within a quoted field path is the backtick character itself, + // escaped using a backslash. Special characters in field paths that + // must be quoted include: `*`, `.`, + // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + // + // Examples: + // (Note: Comments here are written in markdown syntax, so there is an + // additional layer of backticks to represent a code block) + // `\`address.city\`` represents a field named `address.city`, not the map key + // `city` in the field `address`. + // `\`*\`` represents a field named `*`, not any field. + // + // A special `Field` contains the default indexing settings for all fields. + // This field's resource name is: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + // Indexes defined on this `Field` will be applied to all fields which do not + // have their own `Field` index configuration. + string name = 1; + + // The index configuration for this field. If unset, field indexing will + // revert to the configuration defined by the `ancestor_field`. To + // explicitly remove all indexes for this field, specify an index config + // with an empty list of indexes. + IndexConfig index_config = 2; +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto new file mode 100644 index 000000000000..e753686b200e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto @@ -0,0 +1,274 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. +// + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/api/annotations.proto"; +import "google/firestore/admin/v1/field.proto"; +import "google/firestore/admin/v1/index.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "FirestoreAdminProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; + + +// Operations are created by service `FirestoreAdmin`, but are accessed via +// service `google.longrunning.Operations`. +service FirestoreAdmin { + // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] + // which may be used to track the status of the creation. The metadata for + // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + body: "index" + }; + } + + // Lists composite indexes. + rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + }; + } + + // Gets a composite index. + rpc GetIndex(GetIndexRequest) returns (Index) { + option (google.api.http) = { + get: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + }; + } + + // Deletes a composite index. + rpc DeleteIndex(DeleteIndexRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + }; + } + + // Gets the metadata and configuration for a Field. + rpc GetField(GetFieldRequest) returns (Field) { + option (google.api.http) = { + get: "/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}" + }; + } + + // Updates a field configuration. Currently, field updates apply only to + // single field index configuration. However, calls to + // [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid + // changing any configuration that the caller isn't aware of. The field mask + // should be specified as: `{ paths: "index_config" }`. + // + // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + // track the status of the field update. The metadata for + // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + // + // To configure the default field settings for the database, use + // the special `Field` with resource name: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + rpc UpdateField(UpdateFieldRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}" + body: "field" + }; + } + + // Lists the field configuration and metadata for this database. + // + // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. + rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields" + }; + } + + // Exports a copy of all or a subset of documents from Google Cloud Firestore + // to another storage system, such as Google Cloud Storage. Recent updates to + // documents may not be reflected in the export. The export occurs in the + // background and its progress can be monitored and managed via the + // Operation resource that is created. The output of an export may only be + // used once the associated operation is done. If an export operation is + // cancelled before completion it may leave partial data behind in Google + // Cloud Storage. + rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*}:exportDocuments" + body: "*" + }; + } + + // Imports documents into Google Cloud Firestore. Existing documents with the + // same name are overwritten. The import occurs in the background and its + // progress can be monitored and managed via the Operation resource that is + // created. If an ImportDocuments operation is cancelled, it is possible + // that a subset of the data has already been imported to Cloud Firestore. + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*}:importDocuments" + body: "*" + }; + } +} + +// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +message CreateIndexRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The composite index to create. + Index index = 2; +} + +// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +message ListIndexesRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The filter to apply to list results. + string filter = 2; + + // The number of results to return. + int32 page_size = 3; + + // A page token, returned from a previous call to + // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + // page of results. + string page_token = 4; +} + +// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +message ListIndexesResponse { + // The requested indexes. + repeated Index indexes = 1; + + // A page token that may be used to request another page of results. If blank, + // this is the last page. + string next_page_token = 2; +} + +// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex]. +message GetIndexRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. +message DeleteIndexRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. +message UpdateFieldRequest { + // The field to be updated. + Field field = 1; + + // A mask, relative to the field. If specified, only configuration specified + // by this field_mask will be updated in the field. + google.protobuf.FieldMask update_mask = 2; +} + +// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField]. +message GetFieldRequest { + // A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + string name = 1; +} + +// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +message ListFieldsRequest { + // A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + string parent = 1; + + // The filter to apply to list results. Currently, + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. + string filter = 2; + + // The number of results to return. + int32 page_size = 3; + + // A page token, returned from a previous call to + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + // page of results. + string page_token = 4; +} + +// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +message ListFieldsResponse { + // The requested fields. + repeated Field fields = 1; + + // A page token that may be used to request another page of results. If blank, + // this is the last page. + string next_page_token = 2; +} + +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsRequest { + // Database to export. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to export. Unspecified means all collections. + repeated string collection_ids = 2; + + // The output URI. Currently only supports Google Cloud Storage URIs of the + // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + // Google Cloud Storage namespace path. When + // choosing a name, be sure to consider Google Cloud Storage naming + // guidelines: https://cloud.google.com/storage/docs/naming. + // If the URI is a bucket (without a namespace path), a prefix will be + // generated based on the start time. + string output_uri_prefix = 3; +} + +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsRequest { + // Database to import into. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1; + + // Which collection ids to import. Unspecified means all collections included + // in the import. + repeated string collection_ids = 2; + + // Location of the exported files. + // This must match the output_uri_prefix of an ExportDocumentsResponse from + // an export that has completed successfully. + // See: + // [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + string input_uri_prefix = 3; +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto new file mode 100644 index 000000000000..94941d3a0707 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto @@ -0,0 +1,149 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. +// + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "IndexProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; + + +// Cloud Firestore indexes enable simple and complex queries against +// documents in a database. +message Index { + // A field in an index. + // The field_path describes which field is indexed, the value_mode describes + // how the field value is indexed. + message IndexField { + // The supported orderings. + enum Order { + // The ordering is unspecified. Not a valid option. + ORDER_UNSPECIFIED = 0; + + // The field is ordered by ascending field value. + ASCENDING = 1; + + // The field is ordered by descending field value. + DESCENDING = 2; + } + + // The supported array value configurations. + enum ArrayConfig { + // The index does not support additional array queries. + ARRAY_CONFIG_UNSPECIFIED = 0; + + // The index supports array containment queries. + CONTAINS = 1; + } + + // Can be __name__. + // For single field indexes, this must match the name of the field or may + // be omitted. + string field_path = 1; + + // How the field value is indexed. + oneof value_mode { + // Indicates that this field supports ordering by the specified order or + // comparing using =, <, <=, >, >=. + Order order = 2; + + // Indicates that this field supports operations on `array_value`s. + ArrayConfig array_config = 3; + } + } + + // Query Scope defines the scope at which a query is run. This is specified on + // a StructuredQuery's `from` field. + enum QueryScope { + // The query scope is unspecified. Not a valid option. + QUERY_SCOPE_UNSPECIFIED = 0; + + // Indexes with a collection query scope specified allow queries + // against a collection that is the child of a specific document, specified + // at query time, and that has the collection id specified by the index. + COLLECTION = 1; + } + + // The state of an index. During index creation, an index will be in the + // `CREATING` state. If the index is created successfully, it will transition + // to the `READY` state. If the index creation encounters a problem, the index + // will transition to the `NEEDS_REPAIR` state. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The index is being created. + // There is an active long-running operation for the index. + // The index is updated when writing a document. + // Some index data may exist. + CREATING = 1; + + // The index is ready to be used. + // The index is updated when writing a document. + // The index is fully populated from all stored documents it applies to. + READY = 2; + + // The index was being created, but something went wrong. + // There is no active long-running operation for the index, + // and the most recently finished long-running operation failed. + // The index is not updated when writing a document. + // Some index data may exist. + // Use the google.longrunning.Operations API to determine why the operation + // that last attempted to create this index failed, then re-create the + // index. + NEEDS_REPAIR = 3; + } + + // Output only. + // A server defined name for this index. + // The form of this name for composite indexes will be: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + // For single field indexes, this field will be empty. + string name = 1; + + // Indexes with a collection query scope specified allow queries + // against a collection that is the child of a specific document, specified at + // query time, and that has the same collection id. + // + // Indexes with a collection group query scope specified allow queries against + // all collections descended from a specific document, specified at query + // time, and that have the same collection id as this index. + QueryScope query_scope = 2; + + // The fields supported by this index. + // + // For composite indexes, this is always 2 or more fields. + // The last field entry is always for the field path `__name__`. If, on + // creation, `__name__` was not specified as the last field, it will be added + // automatically with the same direction as that of the last field defined. If + // the final field in a composite index is not directional, the `__name__` + // will be ordered ASCENDING (unless explicitly specified). + // + // For single field indexes, this will always be exactly one entry with a + // field path equal to the field path of the associated field. + repeated IndexField fields = 3; + + // Output only. + // The serving state of the index. + State state = 4; +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto new file mode 100644 index 000000000000..7b56051a5c36 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/location.proto @@ -0,0 +1,35 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. +// + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/type/latlng.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "LocationProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; + + +// The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. +message LocationMetadata { + +} diff --git a/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto new file mode 100644 index 000000000000..d333d9b7de25 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto @@ -0,0 +1,204 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. +// + +syntax = "proto3"; + +package google.firestore.admin.v1; + +import "google/firestore/admin/v1/index.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; +option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; +option java_multiple_files = true; +option java_outer_classname = "OperationProto"; +option java_package = "com.google.firestore.admin.v1"; +option objc_class_prefix = "GCFS"; +option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; + + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +message IndexOperationMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The index resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + string index = 3; + + // The state of the operation. + OperationState state = 4; + + // The progress, in documents, of this operation. + Progress progress_documents = 5; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 6; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. +message FieldOperationMetadata { + // Information about an index configuration change. + message IndexConfigDelta { + // Specifies how the index is changing. + enum ChangeType { + // The type of change is not specified or known. + CHANGE_TYPE_UNSPECIFIED = 0; + + // The single field index is being added. + ADD = 1; + + // The single field index is being removed. + REMOVE = 2; + } + + // Specifies how the index is changing. + ChangeType change_type = 1; + + // The index being changed. + Index index = 2; + } + + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The field resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + string field = 3; + + // A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + // operation. + repeated IndexConfigDelta index_config_deltas = 4; + + // The state of the operation. + OperationState state = 5; + + // The progress, in documents, of this operation. + Progress progress_documents = 6; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 7; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +message ExportDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the export operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // Which collection ids are being exported. + repeated string collection_ids = 6; + + // Where the entities are being exported to. + string output_uri_prefix = 7; +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from +// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +message ImportDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the import operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // Which collection ids are being imported. + repeated string collection_ids = 6; + + // The location of the documents being imported. + string input_uri_prefix = 7; +} + +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. +message ExportDocumentsResponse { + // Location of the output files. This can be used to begin an import + // into Cloud Firestore (this project or another project) after the operation + // completes successfully. + string output_uri_prefix = 1; +} + +// Describes the state of the operation. +enum OperationState { + // Unspecified. + OPERATION_STATE_UNSPECIFIED = 0; + + // Request is being prepared for processing. + INITIALIZING = 1; + + // Request is actively being processed. + PROCESSING = 2; + + // Request is in the process of being cancelled after user called + // google.longrunning.Operations.CancelOperation on the operation. + CANCELLING = 3; + + // Request has been processed and is in its finalization stage. + FINALIZING = 4; + + // Request has completed successfully. + SUCCESSFUL = 5; + + // Request has finished being processed, but encountered an error. + FAILED = 6; + + // Request has finished being cancelled after user called + // google.longrunning.Operations.CancelOperation. + CANCELLED = 7; +} + +// Describes the progress of the operation. +// Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress] +// is used. +message Progress { + // The amount of work estimated. + int64 estimated_work = 1; + + // The amount of work completed. + int64 completed_work = 2; +} 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 index 4c097a0cb5c3..80ede040eaa6 100644 --- 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 @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
+ * The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
  * 
* * Protobuf type {@code google.firestore.v1.BatchGetDocumentsRequest} @@ -724,8 +723,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
+   * The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
    * 
* * Protobuf type {@code google.firestore.v1.BatchGetDocumentsRequest} 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 index 4e7791c9cea3..641fae961f7d 100644 --- 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 @@ -7,8 +7,7 @@ * * *
- * The streamed response for
- * [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
+ * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
  * 
* * Protobuf type {@code google.firestore.v1.BatchGetDocumentsResponse} @@ -273,8 +272,7 @@ public 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.
+   * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
    * 
* * bytes transaction = 3; @@ -547,8 +545,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The streamed response for
-   * [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
+   * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
    * 
* * Protobuf type {@code google.firestore.v1.BatchGetDocumentsResponse} @@ -1076,8 +1073,7 @@ public Builder setMissingBytes(com.google.protobuf.ByteString value) { *
      * 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.
+     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
      * 
* * bytes transaction = 3; @@ -1091,8 +1087,7 @@ public com.google.protobuf.ByteString getTransaction() { *
      * 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.
+     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
      * 
* * bytes transaction = 3; @@ -1112,8 +1107,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { *
      * 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.
+     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
      * 
* * bytes transaction = 3; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java index 383996dd2d60..7757fe305814 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponseOrBuilder.java @@ -68,8 +68,7 @@ public interface BatchGetDocumentsResponseOrBuilder *
    * 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.
+   * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
    * 
* * bytes transaction = 3; 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 index 9e9e51bff10a..af42d2e00f96 100644 --- 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 @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
+ * The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
  * 
* * Protobuf type {@code google.firestore.v1.BeginTransactionRequest} @@ -375,8 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
+   * The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
    * 
* * Protobuf type {@code google.firestore.v1.BeginTransactionRequest} 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 index 624502f60bb1..e6e333802284 100644 --- 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 @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
+ * The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
  * 
* * Protobuf type {@code google.firestore.v1.BeginTransactionResponse} @@ -269,8 +268,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
+   * The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].
    * 
* * Protobuf type {@code google.firestore.v1.BeginTransactionResponse} 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 index 84047cf6c4ec..6019b5869a00 100644 --- 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 @@ -42,8 +42,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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\"#" + + "le.firestore.v1\032\037google/protobuf/timesta" + + "mp.proto\032\034google/api/annotations.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" @@ -72,8 +72,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1_DocumentMask_descriptor = @@ -116,8 +116,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "ReadTime", "ConsistencySelector", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java index 1f9584a76884..f08298be5c65 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
+ * The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
  * 
* * Protobuf type {@code google.firestore.v1.CreateDocumentRequest} @@ -568,8 +567,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
+   * The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
    * 
* * Protobuf type {@code google.firestore.v1.CreateDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java index 8dd80e7b0a5a..a6d7daf36d7d 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].
+ * The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].
  * 
* * Protobuf type {@code google.firestore.v1.DeleteDocumentRequest} @@ -375,8 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].
+   * The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].
    * 
* * Protobuf type {@code google.firestore.v1.DeleteDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java index 879048eadfbe..088e1847cf33 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java @@ -8,11 +8,10 @@ * *
  * 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.
+ * 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} @@ -503,11 +502,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * 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.
+   * 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} 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 index 4fd4aca746d1..c0a83d86a3ae 100644 --- 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 @@ -8,11 +8,10 @@ * *
  * 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.
+ * 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} @@ -146,8 +145,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that was
-   * deleted.
+   * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
    * 
* * string document = 1; @@ -167,8 +165,7 @@ public java.lang.String getDocument() { * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that was
-   * deleted.
+   * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
    * 
* * string document = 1; @@ -472,11 +469,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * 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.
+   * 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} @@ -670,8 +666,7 @@ public Builder mergeFrom( * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that was
-     * deleted.
+     * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
      * 
* * string document = 1; @@ -691,8 +686,7 @@ public java.lang.String getDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that was
-     * deleted.
+     * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
      * 
* * string document = 1; @@ -712,8 +706,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that was
-     * deleted.
+     * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
      * 
* * string document = 1; @@ -731,8 +724,7 @@ public Builder setDocument(java.lang.String value) { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that was
-     * deleted.
+     * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
      * 
* * string document = 1; @@ -747,8 +739,7 @@ public Builder clearDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that was
-     * deleted.
+     * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
      * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java index 071171493d89..a4644be12f4b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDeleteOrBuilder.java @@ -12,8 +12,7 @@ public interface DocumentDeleteOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that was
-   * deleted.
+   * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
    * 
* * string document = 1; @@ -23,8 +22,7 @@ public interface DocumentDeleteOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that was
-   * deleted.
+   * The resource name of the [Document][google.firestore.v1.Document] that was deleted.
    * 
* * string document = 1; 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 index 6e7a8fa1c76a..eac18de912d5 100644 --- 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 @@ -11,8 +11,7 @@ * 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]. + * [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} @@ -108,9 +107,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; @@ -122,9 +120,8 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; @@ -136,9 +133,8 @@ public int getFieldPathsCount() { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; @@ -150,9 +146,8 @@ public 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.
+   * 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; @@ -334,8 +329,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 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]. + * [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} @@ -513,9 +507,8 @@ private void ensureFieldPathsIsMutable() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -527,9 +520,8 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -541,9 +533,8 @@ public int getFieldPathsCount() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -555,9 +546,8 @@ public 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.
+     * 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; @@ -569,9 +559,8 @@ public com.google.protobuf.ByteString getFieldPathsBytes(int index) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -589,9 +578,8 @@ public Builder setFieldPaths(int index, java.lang.String value) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -609,9 +597,8 @@ public Builder addFieldPaths(java.lang.String value) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -626,9 +613,8 @@ public Builder addAllFieldPaths(java.lang.Iterable values) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; @@ -643,9 +629,8 @@ public Builder clearFieldPaths() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1.Document.fields] for a field path
-     * syntax reference.
+     * 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; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java index 8680187d9256..11476e48406b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentMaskOrBuilder.java @@ -12,9 +12,8 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; @@ -24,9 +23,8 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; @@ -36,9 +34,8 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; @@ -48,9 +45,8 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1.Document.fields] for a field path
-   * syntax reference.
+   * 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; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java index de16046a0533..62f728027348 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentProto.java @@ -46,10 +46,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\"google/firestore/v1/document.proto\022\023go" - + "ogle.firestore.v1\032\034google/api/annotation" - + "s.proto\032\034google/protobuf/struct.proto\032\037g" - + "oogle/protobuf/timestamp.proto\032\030google/t" - + "ype/latlng.proto\"\200\002\n\010Document\022\014\n\004name\030\001 " + + "ogle.firestore.v1\032\034google/protobuf/struc" + + "t.proto\032\037google/protobuf/timestamp.proto" + + "\032\030google/type/latlng.proto\032\034google/api/a" + + "nnotations.proto\"\200\002\n\010Document\022\014\n\004name\030\001 " + "\001(\t\0229\n\006fields\030\002 \003(\0132).google.firestore.v" + "1.Document.FieldsEntry\022/\n\013create_time\030\003 " + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat" @@ -89,10 +89,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.type.LatLngProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1_Document_descriptor = @@ -153,10 +153,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Key", "Value", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.type.LatLngProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java index 402a231b650d..f8c8714e7a2a 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java @@ -7,14 +7,12 @@ * * *
- * A [Document][google.firestore.v1.Document] has been removed from the view of
- * the targets.
+ * A [Document][google.firestore.v1.Document] has been removed from the view of the targets.
  * Sent if the document is no longer relevant to a target and is out of view.
  * Can be sent instead of a DocumentDelete or a DocumentChange if the server
  * can not send the new value of the document.
- * Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be
- * returned for the same logical write or delete, if multiple targets are
- * affected.
+ * Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical
+ * write or delete, if multiple targets are affected.
  * 
* * Protobuf type {@code google.firestore.v1.DocumentRemove} @@ -148,8 +146,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that has
-   * gone out of view.
+   * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
    * 
* * string document = 1; @@ -169,8 +166,7 @@ public java.lang.String getDocument() { * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that has
-   * gone out of view.
+   * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
    * 
* * string document = 1; @@ -473,14 +469,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A [Document][google.firestore.v1.Document] has been removed from the view of
-   * the targets.
+   * A [Document][google.firestore.v1.Document] has been removed from the view of the targets.
    * Sent if the document is no longer relevant to a target and is out of view.
    * Can be sent instead of a DocumentDelete or a DocumentChange if the server
    * can not send the new value of the document.
-   * Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be
-   * returned for the same logical write or delete, if multiple targets are
-   * affected.
+   * Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical
+   * write or delete, if multiple targets are affected.
    * 
* * Protobuf type {@code google.firestore.v1.DocumentRemove} @@ -674,8 +668,7 @@ public Builder mergeFrom( * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that has
-     * gone out of view.
+     * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -695,8 +688,7 @@ public java.lang.String getDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that has
-     * gone out of view.
+     * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -716,8 +708,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that has
-     * gone out of view.
+     * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -735,8 +726,7 @@ public Builder setDocument(java.lang.String value) { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that has
-     * gone out of view.
+     * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -751,8 +741,7 @@ public Builder clearDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1.Document] that has
-     * gone out of view.
+     * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
      * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java index 182aaad73d83..55e07d9aecff 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemoveOrBuilder.java @@ -12,8 +12,7 @@ public interface DocumentRemoveOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that has
-   * gone out of view.
+   * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
    * 
* * string document = 1; @@ -23,8 +22,7 @@ public interface DocumentRemoveOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1.Document] that has
-   * gone out of view.
+   * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
    * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java index 03109eb9bd06..16b9eb8cdeb7 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java @@ -118,9 +118,8 @@ public interface FieldTransformOrBuilder * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1.Document.fields] for the field path
-     * syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -130,9 +129,8 @@ public interface FieldTransformOrBuilder * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1.Document.fields] for the field path
-     * syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -811,9 +809,8 @@ public TransformTypeCase getTransformTypeCase() { * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1.Document.fields] for the field path
-     * syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -833,9 +830,8 @@ public java.lang.String getFieldPath() { * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1.Document.fields] for the field path
-     * syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -1768,9 +1764,8 @@ public Builder clearTransformType() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1.Document.fields] for the field path
-       * syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1790,9 +1785,8 @@ public java.lang.String getFieldPath() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1.Document.fields] for the field path
-       * syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1812,9 +1806,8 @@ public com.google.protobuf.ByteString getFieldPathBytes() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1.Document.fields] for the field path
-       * syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1832,9 +1825,8 @@ public Builder setFieldPath(java.lang.String value) { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1.Document.fields] for the field path
-       * syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1849,9 +1841,8 @@ public Builder clearFieldPath() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1.Document.fields] for the field path
-       * syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java index 1b1cc113a336..b0e253af275d 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java @@ -116,8 +116,7 @@ public int getTargetId() { * * *
-   * The total count of documents that match
-   * [target_id][google.firestore.v1.ExistenceFilter.target_id].
+   * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
    * If different from the count of documents in the client that match, the
    * client must manually determine which documents no longer match the target.
    * 
@@ -507,8 +506,7 @@ public Builder clearTargetId() { * * *
-     * The total count of documents that match
-     * [target_id][google.firestore.v1.ExistenceFilter.target_id].
+     * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
      * If different from the count of documents in the client that match, the
      * client must manually determine which documents no longer match the target.
      * 
@@ -522,8 +520,7 @@ public int getCount() { * * *
-     * The total count of documents that match
-     * [target_id][google.firestore.v1.ExistenceFilter.target_id].
+     * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
      * If different from the count of documents in the client that match, the
      * client must manually determine which documents no longer match the target.
      * 
@@ -540,8 +537,7 @@ public Builder setCount(int value) { * * *
-     * The total count of documents that match
-     * [target_id][google.firestore.v1.ExistenceFilter.target_id].
+     * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
      * If different from the count of documents in the client that match, the
      * client must manually determine which documents no longer match the target.
      * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java index 902319ba976e..044aec9816a7 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilterOrBuilder.java @@ -23,8 +23,7 @@ public interface ExistenceFilterOrBuilder * * *
-   * The total count of documents that match
-   * [target_id][google.firestore.v1.ExistenceFilter.target_id].
+   * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
    * If different from the count of documents in the client that match, the
    * client must manually determine which documents no longer match the target.
    * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java index 86e353ce41dd..3794b9c5ecc8 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].
+ * The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].
  * 
* * Protobuf type {@code google.firestore.v1.GetDocumentRequest} @@ -541,8 +540,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].
+   * The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].
    * 
* * Protobuf type {@code google.firestore.v1.GetDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java index 838900ea8346..45304820307f 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
+ * The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
  * 
* * Protobuf type {@code google.firestore.v1.ListCollectionIdsRequest} @@ -397,8 +396,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
+   * The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
    * 
* * Protobuf type {@code google.firestore.v1.ListCollectionIdsRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java index 8077a4e78dc7..4d1d95ed771b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java @@ -7,8 +7,7 @@ * * *
- * The response from
- * [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
+ * The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
  * 
* * Protobuf type {@code google.firestore.v1.ListCollectionIdsResponse} @@ -381,8 +380,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response from
-   * [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
+   * The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].
    * 
* * Protobuf type {@code google.firestore.v1.ListCollectionIdsResponse} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java index f205182f9a21..5df0e959d496 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
+ * The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
  * 
* * Protobuf type {@code google.firestore.v1.ListDocumentsRequest} @@ -521,9 +520,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { *
    * If the list should show missing documents. A missing document is a
    * document that does not exist but has sub-documents. These documents will
-   * be returned with a key but will not have fields,
-   * [Document.create_time][google.firestore.v1.Document.create_time], or
-   * [Document.update_time][google.firestore.v1.Document.update_time] set.
+   * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
+   * or [Document.update_time][google.firestore.v1.Document.update_time] set.
    * Requests with `show_missing` may not specify `where` or
    * `order_by`.
    * 
@@ -797,8 +795,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
+   * The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
    * 
* * Protobuf type {@code google.firestore.v1.ListDocumentsRequest} @@ -1954,9 +1951,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { *
      * If the list should show missing documents. A missing document is a
      * document that does not exist but has sub-documents. These documents will
-     * be returned with a key but will not have fields,
-     * [Document.create_time][google.firestore.v1.Document.create_time], or
-     * [Document.update_time][google.firestore.v1.Document.update_time] set.
+     * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
+     * or [Document.update_time][google.firestore.v1.Document.update_time] set.
      * Requests with `show_missing` may not specify `where` or
      * `order_by`.
      * 
@@ -1972,9 +1968,8 @@ public boolean getShowMissing() { *
      * If the list should show missing documents. A missing document is a
      * document that does not exist but has sub-documents. These documents will
-     * be returned with a key but will not have fields,
-     * [Document.create_time][google.firestore.v1.Document.create_time], or
-     * [Document.update_time][google.firestore.v1.Document.update_time] set.
+     * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
+     * or [Document.update_time][google.firestore.v1.Document.update_time] set.
      * Requests with `show_missing` may not specify `where` or
      * `order_by`.
      * 
@@ -1993,9 +1988,8 @@ public Builder setShowMissing(boolean value) { *
      * If the list should show missing documents. A missing document is a
      * document that does not exist but has sub-documents. These documents will
-     * be returned with a key but will not have fields,
-     * [Document.create_time][google.firestore.v1.Document.create_time], or
-     * [Document.update_time][google.firestore.v1.Document.update_time] set.
+     * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
+     * or [Document.update_time][google.firestore.v1.Document.update_time] set.
      * Requests with `show_missing` may not specify `where` or
      * `order_by`.
      * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java index fdf386f57350..7b2561ae5eb4 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java @@ -203,9 +203,8 @@ public interface ListDocumentsRequestOrBuilder *
    * If the list should show missing documents. A missing document is a
    * document that does not exist but has sub-documents. These documents will
-   * be returned with a key but will not have fields,
-   * [Document.create_time][google.firestore.v1.Document.create_time], or
-   * [Document.update_time][google.firestore.v1.Document.update_time] set.
+   * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time],
+   * or [Document.update_time][google.firestore.v1.Document.update_time] set.
    * Requests with `show_missing` may not specify `where` or
    * `order_by`.
    * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java index 4d1c32185200..e4383afceac1 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
+ * The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
  * 
* * Protobuf type {@code google.firestore.v1.ListDocumentsResponse} @@ -389,8 +388,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
+   * The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].
    * 
* * Protobuf type {@code google.firestore.v1.ListDocumentsResponse} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java index 39359f585128..a5270da5b2aa 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java @@ -348,8 +348,8 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde * * *
-   * A [Document][google.firestore.v1.Document] has been removed from a target
-   * (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -361,8 +361,8 @@ public boolean hasDocumentRemove() { * * *
-   * A [Document][google.firestore.v1.Document] has been removed from a target
-   * (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -377,8 +377,8 @@ public com.google.firestore.v1.DocumentRemove getDocumentRemove() { * * *
-   * A [Document][google.firestore.v1.Document] has been removed from a target
-   * (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1525,8 +1525,8 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1538,8 +1538,8 @@ public boolean hasDocumentRemove() { * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1561,8 +1561,8 @@ public com.google.firestore.v1.DocumentRemove getDocumentRemove() { * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1584,8 +1584,8 @@ public Builder setDocumentRemove(com.google.firestore.v1.DocumentRemove value) { * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1605,8 +1605,8 @@ public Builder setDocumentRemove( * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1637,8 +1637,8 @@ public Builder mergeDocumentRemove(com.google.firestore.v1.DocumentRemove value) * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1663,8 +1663,8 @@ public Builder clearDocumentRemove() { * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1676,8 +1676,8 @@ public com.google.firestore.v1.DocumentRemove.Builder getDocumentRemoveBuilder() * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -1696,8 +1696,8 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde * * *
-     * A [Document][google.firestore.v1.Document] has been removed from a target
-     * (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java index 5d663df25095..3394cb55ed53 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponseOrBuilder.java @@ -105,8 +105,8 @@ public interface ListenResponseOrBuilder * * *
-   * A [Document][google.firestore.v1.Document] has been removed from a target
-   * (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -116,8 +116,8 @@ public interface ListenResponseOrBuilder * * *
-   * A [Document][google.firestore.v1.Document] has been removed from a target
-   * (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; @@ -127,8 +127,8 @@ public interface ListenResponseOrBuilder * * *
-   * A [Document][google.firestore.v1.Document] has been removed from a target
-   * (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1.DocumentRemove document_remove = 6; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java index bc3c06b1ada8..1b892e9c78fd 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java @@ -36,14 +36,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -62,9 +62,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\037google/firestore/v1/query.proto\022\023googl" - + "e.firestore.v1\032\034google/api/annotations.p" - + "roto\032\"google/firestore/v1/document.proto" - + "\032\036google/protobuf/wrappers.proto\"\332\016\n\017Str" + + "e.firestore.v1\032\"google/firestore/v1/docu" + + "ment.proto\032\036google/protobuf/wrappers.pro" + + "to\032\034google/api/annotations.proto\"\332\016\n\017Str" + "ucturedQuery\022?\n\006select\030\001 \001(\0132/.google.fi" + "restore.v1.StructuredQuery.Projection\022E\n" + "\004from\030\002 \003(\01327.google.firestore.v1.Struct" @@ -103,12 +103,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\002 \001(\01323.google.firestore.v1.StructuredQ" + "uery.FieldReferenceH\000\"=\n\010Operator\022\030\n\024OPE" + "RATOR_UNSPECIFIED\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NU" - + "LL\020\003B\016\n\014operand_type\032\216\001\n\005Order\022B\n\005field\030" - + "\001 \001(\01323.google.firestore.v1.StructuredQu" - + "ery.FieldReference\022A\n\tdirection\030\002 \001(\0162.." - + "google.firestore.v1.StructuredQuery.Dire" - + "ction\032$\n\016FieldReference\022\022\n\nfield_path\030\002 " - + "\001(\t\032Q\n\nProjection\022C\n\006fields\030\002 \003(\01323.goog" + + "LL\020\003B\016\n\014operand_type\032$\n\016FieldReference\022\022" + + "\n\nfield_path\030\002 \001(\t\032\216\001\n\005Order\022B\n\005field\030\001 " + + "\001(\01323.google.firestore.v1.StructuredQuer" + + "y.FieldReference\022A\n\tdirection\030\002 \001(\0162..go" + + "ogle.firestore.v1.StructuredQuery.Direct" + + "ion\032Q\n\nProjection\022C\n\006fields\030\002 \003(\01323.goog" + "le.firestore.v1.StructuredQuery.FieldRef" + "erence\"E\n\tDirection\022\031\n\025DIRECTION_UNSPECI" + "FIED\020\000\022\r\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"D\n" @@ -131,9 +131,9 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.firestore.v1.DocumentProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1_StructuredQuery_descriptor = @@ -184,21 +184,21 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Op", "Field", "OperandType", }); - internal_static_google_firestore_v1_StructuredQuery_Order_descriptor = + internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor = internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(5); - internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable = + internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_firestore_v1_StructuredQuery_Order_descriptor, + internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor, new java.lang.String[] { - "Field", "Direction", + "FieldPath", }); - internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor = + internal_static_google_firestore_v1_StructuredQuery_Order_descriptor = internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(6); - internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable = + internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor, + internal_static_google_firestore_v1_StructuredQuery_Order_descriptor, new java.lang.String[] { - "FieldPath", + "Field", "Direction", }); internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor = internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(7); @@ -216,9 +216,9 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Values", "Before", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.firestore.v1.DocumentProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java index e21a15ad0d8a..bb1df98c4d6a 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
+ * The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
  * 
* * Protobuf type {@code google.firestore.v1.RunQueryResponse} @@ -134,9 +133,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * The transaction that was started as part of this request.
    * Can only be set in the first response, and only if
-   * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction]
-   * was set in the request. If set, no other fields will be set in this
-   * response.
+   * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
+   * If set, no other fields will be set in this response.
    * 
* * bytes transaction = 2; @@ -457,8 +455,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
+   * The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].
    * 
* * Protobuf type {@code google.firestore.v1.RunQueryResponse} @@ -651,9 +648,8 @@ public Builder mergeFrom( *
      * The transaction that was started as part of this request.
      * Can only be set in the first response, and only if
-     * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction]
-     * was set in the request. If set, no other fields will be set in this
-     * response.
+     * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
+     * If set, no other fields will be set in this response.
      * 
* * bytes transaction = 2; @@ -667,9 +663,8 @@ public com.google.protobuf.ByteString getTransaction() { *
      * The transaction that was started as part of this request.
      * Can only be set in the first response, and only if
-     * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction]
-     * was set in the request. If set, no other fields will be set in this
-     * response.
+     * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
+     * If set, no other fields will be set in this response.
      * 
* * bytes transaction = 2; @@ -689,9 +684,8 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { *
      * The transaction that was started as part of this request.
      * Can only be set in the first response, and only if
-     * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction]
-     * was set in the request. If set, no other fields will be set in this
-     * response.
+     * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
+     * If set, no other fields will be set in this response.
      * 
* * bytes transaction = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java index 55979ddcf528..2b18df04a319 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponseOrBuilder.java @@ -14,9 +14,8 @@ public interface RunQueryResponseOrBuilder *
    * The transaction that was started as part of this request.
    * Can only be set in the first response, and only if
-   * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction]
-   * was set in the request. If set, no other fields will be set in this
-   * response.
+   * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request.
+   * If set, no other fields will be set in this response.
    * 
* * bytes transaction = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java index 606e72ffb75b..83ee3cfe276b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java @@ -6470,84 +6470,37 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstanceFor } } - public interface OrderOrBuilder + public interface FieldReferenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.Order) + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.FieldReference) com.google.protobuf.MessageOrBuilder { - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - boolean hasField(); - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - com.google.firestore.v1.StructuredQuery.FieldReference getField(); - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); - - /** - * - * - *
-     * The direction to order by. Defaults to `ASCENDING`.
-     * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - int getDirectionValue(); - /** - * - * - *
-     * The direction to order by. Defaults to `ASCENDING`.
-     * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - com.google.firestore.v1.StructuredQuery.Direction getDirection(); + /** string field_path = 2; */ + java.lang.String getFieldPath(); + /** string field_path = 2; */ + com.google.protobuf.ByteString getFieldPathBytes(); } /** * * *
-   * An order on a field.
+   * A reference to a field, such as `max(messages.time) as max_time`.
    * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} */ - public static final class Order extends com.google.protobuf.GeneratedMessageV3 + public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Order) - OrderOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FieldReference) + FieldReferenceOrBuilder { private static final long serialVersionUID = 0L; - // Use Order.newBuilder() to construct. - private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use FieldReference.newBuilder() to construct. + private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Order() { - direction_ = 0; + private FieldReference() { + fieldPath_ = ""; } @java.lang.Override @@ -6555,7 +6508,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Order( + private FieldReference( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6574,28 +6527,11 @@ private Order( case 0: done = true; break; - case 10: - { - com.google.firestore.v1.StructuredQuery.FieldReference.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = - input.readMessage( - com.google.firestore.v1.StructuredQuery.FieldReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 16: + case 18: { - int rawValue = input.readEnum(); + java.lang.String s = input.readStringRequireUtf8(); - direction_ = rawValue; + fieldPath_ = s; break; } default: @@ -6619,90 +6555,44 @@ private Order( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.Order.class, - com.google.firestore.v1.StructuredQuery.Order.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.firestore.v1.StructuredQuery.FieldReference field_; - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public boolean hasField() { - return field_ != null; - } - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference getField() { - return field_ == null - ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; - } - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - return getField(); + com.google.firestore.v1.StructuredQuery.FieldReference.class, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); } - public static final int DIRECTION_FIELD_NUMBER = 2; - private int direction_; - /** - * - * - *
-     * The direction to order by. Defaults to `ASCENDING`.
-     * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public int getDirectionValue() { - return direction_; + public static final int FIELD_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object fieldPath_; + /** string field_path = 2; */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + 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(); + fieldPath_ = s; + return s; + } } - /** - * - * - *
-     * The direction to order by. Defaults to `ASCENDING`.
-     * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public com.google.firestore.v1.StructuredQuery.Direction getDirection() { - @SuppressWarnings("deprecation") - com.google.firestore.v1.StructuredQuery.Direction result = - com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); - return result == null - ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED - : result; + /** string field_path = 2; */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -6719,12 +6609,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (direction_ - != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { - output.writeEnum(2, direction_); + if (!getFieldPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); } unknownFields.writeTo(output); } @@ -6735,12 +6621,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); - } - if (direction_ - != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); + if (!getFieldPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6752,18 +6634,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1.StructuredQuery.Order)) { + if (!(obj instanceof com.google.firestore.v1.StructuredQuery.FieldReference)) { return super.equals(obj); } - com.google.firestore.v1.StructuredQuery.Order other = - (com.google.firestore.v1.StructuredQuery.Order) obj; + com.google.firestore.v1.StructuredQuery.FieldReference other = + (com.google.firestore.v1.StructuredQuery.FieldReference) obj; boolean result = true; - result = result && (hasField() == other.hasField()); - if (hasField()) { - result = result && getField().equals(other.getField()); - } - result = result && direction_ == other.direction_; + result = result && getFieldPath().equals(other.getFieldPath()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -6775,82 +6653,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (37 * hash) + DIRECTION_FIELD_NUMBER; - hash = (53 * hash) + direction_; + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference 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.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference 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.StructuredQuery.Order parseFrom(byte[] data) + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference 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.StructuredQuery.Order parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.Order parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference 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.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6867,7 +6741,8 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.firestore.v1.StructuredQuery.Order prototype) { + public static Builder newBuilder( + com.google.firestore.v1.StructuredQuery.FieldReference prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -6886,32 +6761,32 @@ protected Builder newBuilderForType( * * *
-     * An order on a field.
+     * A reference to a field, such as `max(messages.time) as max_time`.
      * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.Order) - com.google.firestore.v1.StructuredQuery.OrderOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.FieldReference) + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.Order.class, - com.google.firestore.v1.StructuredQuery.Order.Builder.class); + com.google.firestore.v1.StructuredQuery.FieldReference.class, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); } - // Construct using com.google.firestore.v1.StructuredQuery.Order.newBuilder() + // Construct using com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6928,13 +6803,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - direction_ = 0; + fieldPath_ = ""; return this; } @@ -6942,17 +6811,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { - return com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance(); + public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order build() { - com.google.firestore.v1.StructuredQuery.Order result = buildPartial(); + public com.google.firestore.v1.StructuredQuery.FieldReference build() { + com.google.firestore.v1.StructuredQuery.FieldReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -6960,15 +6829,10 @@ public com.google.firestore.v1.StructuredQuery.Order build() { } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order buildPartial() { - com.google.firestore.v1.StructuredQuery.Order result = - new com.google.firestore.v1.StructuredQuery.Order(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - result.direction_ = direction_; + public com.google.firestore.v1.StructuredQuery.FieldReference buildPartial() { + com.google.firestore.v1.StructuredQuery.FieldReference result = + new com.google.firestore.v1.StructuredQuery.FieldReference(this); + result.fieldPath_ = fieldPath_; onBuilt(); return result; } @@ -7010,22 +6874,20 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1.StructuredQuery.Order) { - return mergeFrom((com.google.firestore.v1.StructuredQuery.Order) other); + if (other instanceof com.google.firestore.v1.StructuredQuery.FieldReference) { + return mergeFrom((com.google.firestore.v1.StructuredQuery.FieldReference) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.Order other) { - if (other == com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.FieldReference other) { + if (other == com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - if (other.direction_ != 0) { - setDirectionValue(other.getDirectionValue()); + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; + onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7042,11 +6904,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1.StructuredQuery.Order parsedMessage = null; + com.google.firestore.v1.StructuredQuery.FieldReference parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.firestore.v1.StructuredQuery.Order) e.getUnfinishedMessage(); + parsedMessage = + (com.google.firestore.v1.StructuredQuery.FieldReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7056,270 +6919,64 @@ public Builder mergeFrom( return this; } - private com.google.firestore.v1.StructuredQuery.FieldReference field_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - fieldBuilder_; - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference getField() { - if (fieldBuilder_ == null) { - return field_ == null - ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; + private java.lang.Object fieldPath_ = ""; + /** string field_path = 2; */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; } else { - return fieldBuilder_.getMessage(); + return (java.lang.String) ref; } } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); + /** string field_path = 2; */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; } else { - fieldBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - - return this; } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public Builder setField( - com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); + /** string field_path = 2; */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + fieldPath_ = value; + onChanged(); return this; } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder(field_) - .mergeFrom(value) - .buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } + /** string field_path = 2; */ + public Builder clearFieldPath() { + fieldPath_ = getDefaultInstance().getFieldPath(); + onChanged(); return this; } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; + /** string field_path = 2; */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fieldPath_ = value; + onChanged(); return this; } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null - ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; - } - } - /** - * - * - *
-       * The field to order by.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( - getField(), getParentForChildren(), isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private int direction_ = 0; - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public int getDirectionValue() { - return direction_; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public Builder setDirectionValue(int value) { - direction_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public com.google.firestore.v1.StructuredQuery.Direction getDirection() { - @SuppressWarnings("deprecation") - com.google.firestore.v1.StructuredQuery.Direction result = - com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); - return result == null - ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public Builder setDirection(com.google.firestore.v1.StructuredQuery.Direction value) { - if (value == null) { - throw new NullPointerException(); - } - - direction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - public Builder clearDirection() { - - direction_ = 0; - 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 setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override @@ -7328,77 +6985,124 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Order) + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.FieldReference) } - // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Order) - private static final com.google.firestore.v1.StructuredQuery.Order DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.FieldReference) + private static final com.google.firestore.v1.StructuredQuery.FieldReference DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.Order(); + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.FieldReference(); } - public static com.google.firestore.v1.StructuredQuery.Order getDefaultInstance() { + public static com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Order parsePartialFrom( + public FieldReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Order(input, extensionRegistry); + return new FieldReference(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { + public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FieldReferenceOrBuilder + public interface OrderOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.Order) com.google.protobuf.MessageOrBuilder { - /** string field_path = 2; */ - java.lang.String getFieldPath(); - /** string field_path = 2; */ - com.google.protobuf.ByteString getFieldPathBytes(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + boolean hasField(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + int getDirectionValue(); + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + com.google.firestore.v1.StructuredQuery.Direction getDirection(); } /** * * *
-   * A reference to a field, such as `max(messages.time) as max_time`.
+   * An order on a field.
    * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} */ - public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 + public static final class Order extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FieldReference) - FieldReferenceOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Order) + OrderOrBuilder { private static final long serialVersionUID = 0L; - // Use FieldReference.newBuilder() to construct. - private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Order.newBuilder() to construct. + private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private FieldReference() { - fieldPath_ = ""; + private Order() { + direction_ = 0; } @java.lang.Override @@ -7406,7 +7110,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FieldReference( + private Order( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7425,11 +7129,28 @@ private FieldReference( case 0: done = true; break; - case 18: + case 10: { - java.lang.String s = input.readStringRequireUtf8(); + com.google.firestore.v1.StructuredQuery.FieldReference.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = + input.readMessage( + com.google.firestore.v1.StructuredQuery.FieldReference.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } - fieldPath_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + direction_ = rawValue; break; } default: @@ -7453,44 +7174,90 @@ private FieldReference( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.FieldReference.class, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1.StructuredQuery.Order.class, + com.google.firestore.v1.StructuredQuery.Order.Builder.class); } - public static final int FIELD_PATH_FIELD_NUMBER = 2; - private volatile java.lang.Object fieldPath_; - /** string field_path = 2; */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - 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(); - fieldPath_ = s; - return s; - } + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.firestore.v1.StructuredQuery.FieldReference field_; + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public boolean hasField() { + return field_ != null; } - /** string field_path = 2; */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1.StructuredQuery.FieldReference getField() { + return field_ == null + ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; + } + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int DIRECTION_FIELD_NUMBER = 2; + private int direction_; + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public int getDirectionValue() { + return direction_; + } + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public com.google.firestore.v1.StructuredQuery.Direction getDirection() { + @SuppressWarnings("deprecation") + com.google.firestore.v1.StructuredQuery.Direction result = + com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); + return result == null + ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; @@ -7507,8 +7274,12 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getFieldPathBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (direction_ + != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { + output.writeEnum(2, direction_); } unknownFields.writeTo(output); } @@ -7519,8 +7290,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getFieldPathBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); + } + if (direction_ + != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -7532,14 +7307,18 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1.StructuredQuery.FieldReference)) { + if (!(obj instanceof com.google.firestore.v1.StructuredQuery.Order)) { return super.equals(obj); } - com.google.firestore.v1.StructuredQuery.FieldReference other = - (com.google.firestore.v1.StructuredQuery.FieldReference) obj; + com.google.firestore.v1.StructuredQuery.Order other = + (com.google.firestore.v1.StructuredQuery.Order) obj; boolean result = true; - result = result && getFieldPath().equals(other.getFieldPath()); + result = result && (hasField() == other.hasField()); + if (hasField()) { + result = result && getField().equals(other.getField()); + } + result = result && direction_ == other.direction_; result = result && unknownFields.equals(other.unknownFields); return result; } @@ -7551,78 +7330,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFieldPath().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + direction_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order 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.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order 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.StructuredQuery.FieldReference parseFrom(byte[] data) + public static com.google.firestore.v1.StructuredQuery.Order parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order 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.StructuredQuery.FieldReference parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.Order 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.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7639,8 +7422,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.firestore.v1.StructuredQuery.FieldReference prototype) { + public static Builder newBuilder(com.google.firestore.v1.StructuredQuery.Order prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7659,32 +7441,32 @@ protected Builder newBuilderForType( * * *
-     * A reference to a field, such as `max(messages.time) as max_time`.
+     * An order on a field.
      * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.FieldReference) - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.Order) + com.google.firestore.v1.StructuredQuery.OrderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.FieldReference.class, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1.StructuredQuery.Order.class, + com.google.firestore.v1.StructuredQuery.Order.Builder.class); } - // Construct using com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder() + // Construct using com.google.firestore.v1.StructuredQuery.Order.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7701,7 +7483,13 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - fieldPath_ = ""; + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + direction_ = 0; return this; } @@ -7709,17 +7497,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference build() { - com.google.firestore.v1.StructuredQuery.FieldReference result = buildPartial(); + public com.google.firestore.v1.StructuredQuery.Order build() { + com.google.firestore.v1.StructuredQuery.Order result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7727,10 +7515,15 @@ public com.google.firestore.v1.StructuredQuery.FieldReference build() { } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference buildPartial() { - com.google.firestore.v1.StructuredQuery.FieldReference result = - new com.google.firestore.v1.StructuredQuery.FieldReference(this); - result.fieldPath_ = fieldPath_; + public com.google.firestore.v1.StructuredQuery.Order buildPartial() { + com.google.firestore.v1.StructuredQuery.Order result = + new com.google.firestore.v1.StructuredQuery.Order(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.direction_ = direction_; onBuilt(); return result; } @@ -7772,20 +7565,22 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1.StructuredQuery.FieldReference) { - return mergeFrom((com.google.firestore.v1.StructuredQuery.FieldReference) other); + if (other instanceof com.google.firestore.v1.StructuredQuery.Order) { + return mergeFrom((com.google.firestore.v1.StructuredQuery.Order) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.FieldReference other) { - if (other == com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.Order other) { + if (other == com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance()) return this; - if (!other.getFieldPath().isEmpty()) { - fieldPath_ = other.fieldPath_; - onChanged(); + if (other.hasField()) { + mergeField(other.getField()); + } + if (other.direction_ != 0) { + setDirectionValue(other.getDirectionValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7802,12 +7597,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1.StructuredQuery.FieldReference parsedMessage = null; + com.google.firestore.v1.StructuredQuery.Order parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.firestore.v1.StructuredQuery.FieldReference) e.getUnfinishedMessage(); + parsedMessage = (com.google.firestore.v1.StructuredQuery.Order) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7817,56 +7611,262 @@ public Builder mergeFrom( return this; } - private java.lang.Object fieldPath_ = ""; - /** string field_path = 2; */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } + private com.google.firestore.v1.StructuredQuery.FieldReference field_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + fieldBuilder_; + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; } - /** string field_path = 2; */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1.StructuredQuery.FieldReference getField() { + if (fieldBuilder_ == null) { + return field_ == null + ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; } else { - return (com.google.protobuf.ByteString) ref; + return fieldBuilder_.getMessage(); } } - /** string field_path = 2; */ - public Builder setFieldPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); } - fieldPath_ = value; - onChanged(); return this; } - /** string field_path = 2; */ - public Builder clearFieldPath() { + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder setField( + com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } - fieldPath_ = getDefaultInstance().getFieldPath(); + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder(field_) + .mergeFrom(value) + .buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null + ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; + } + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( + getField(), getParentForChildren(), isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private int direction_ = 0; + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public int getDirectionValue() { + return direction_; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public Builder setDirectionValue(int value) { + direction_ = value; onChanged(); return this; } - /** string field_path = 2; */ - public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public com.google.firestore.v1.StructuredQuery.Direction getDirection() { + @SuppressWarnings("deprecation") + com.google.firestore.v1.StructuredQuery.Direction result = + com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); + return result == null + ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public Builder setDirection(com.google.firestore.v1.StructuredQuery.Direction value) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fieldPath_ = value; + direction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + public Builder clearDirection() { + + direction_ = 0; onChanged(); return this; } @@ -7883,42 +7883,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Order) } - // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.FieldReference) - private static final com.google.firestore.v1.StructuredQuery.FieldReference DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Order) + private static final com.google.firestore.v1.StructuredQuery.Order DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.FieldReference(); + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.Order(); } - public static com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstance() { + public static com.google.firestore.v1.StructuredQuery.Order getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public FieldReference parsePartialFrom( + public Order parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldReference(input, extensionRegistry); + return new Order(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { + public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java index 55e546a79509..167eaaa2aa9c 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java @@ -2161,8 +2161,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui * * *
-   * A resume token from a prior
-   * [TargetChange][google.firestore.v1.TargetChange] for an identical target.
+   * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
    * Using a resume token with a different target is unsupported and may fail.
    * 
* @@ -3161,8 +3160,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui * * *
-     * A resume token from a prior
-     * [TargetChange][google.firestore.v1.TargetChange] for an identical target.
+     * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      * Using a resume token with a different target is unsupported and may fail.
      * 
* @@ -3178,8 +3176,7 @@ public com.google.protobuf.ByteString getResumeToken() { * * *
-     * A resume token from a prior
-     * [TargetChange][google.firestore.v1.TargetChange] for an identical target.
+     * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      * Using a resume token with a different target is unsupported and may fail.
      * 
* @@ -3198,8 +3195,7 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { * * *
-     * A resume token from a prior
-     * [TargetChange][google.firestore.v1.TargetChange] for an identical target.
+     * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      * Using a resume token with a different target is unsupported and may fail.
      * 
* diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java index 345406e0476c..806e74d3b237 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetOrBuilder.java @@ -74,8 +74,7 @@ public interface TargetOrBuilder * * *
-   * A resume token from a prior
-   * [TargetChange][google.firestore.v1.TargetChange] for an identical target.
+   * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.
    * Using a resume token with a different target is unsupported and may fail.
    * 
* diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java index 5cdac9bf3051..862f6be5cda2 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].
+ * The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].
  * 
* * Protobuf type {@code google.firestore.v1.UpdateDocumentRequest} @@ -544,8 +543,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].
+   * The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].
    * 
* * Protobuf type {@code google.firestore.v1.UpdateDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java index 80ab262603b2..53e6ab82a78d 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java @@ -296,7 +296,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { * * *
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -311,7 +311,7 @@ public boolean hasTransform() {
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -329,7 +329,7 @@ public com.google.firestore.v1.DocumentTransform getTransform() {
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -1234,7 +1234,7 @@ public Builder setDeleteBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1249,7 +1249,7 @@ public boolean hasTransform() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1274,7 +1274,7 @@ public com.google.firestore.v1.DocumentTransform getTransform() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1299,7 +1299,7 @@ public Builder setTransform(com.google.firestore.v1.DocumentTransform value) {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1321,7 +1321,7 @@ public Builder setTransform(com.google.firestore.v1.DocumentTransform.Builder bu
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1355,7 +1355,7 @@ public Builder mergeTransform(com.google.firestore.v1.DocumentTransform value) {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1383,7 +1383,7 @@ public Builder clearTransform() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1398,7 +1398,7 @@ public com.google.firestore.v1.DocumentTransform.Builder getTransformBuilder() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1420,7 +1420,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder(
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java
index fc57ec54ce70..3b983afcdffc 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteOrBuilder.java
@@ -66,7 +66,7 @@ public interface WriteOrBuilder
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -79,7 +79,7 @@ public interface WriteOrBuilder
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -92,7 +92,7 @@ public interface WriteOrBuilder
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java
index c4a49ca91042..31d826f0af69 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteProto.java
@@ -54,10 +54,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
   static {
     java.lang.String[] descriptorData = {
       "\n\037google/firestore/v1/write.proto\022\023googl"
-          + "e.firestore.v1\032\034google/api/annotations.p"
-          + "roto\032 google/firestore/v1/common.proto\032\""
-          + "google/firestore/v1/document.proto\032\037goog"
-          + "le/protobuf/timestamp.proto\"\211\002\n\005Write\022/\n"
+          + "e.firestore.v1\032 google/firestore/v1/comm"
+          + "on.proto\032\"google/firestore/v1/document.p"
+          + "roto\032\037google/protobuf/timestamp.proto\032\034g"
+          + "oogle/api/annotations.proto\"\211\002\n\005Write\022/\n"
           + "\006update\030\001 \001(\0132\035.google.firestore.v1.Docu"
           + "mentH\000\022\020\n\006delete\030\002 \001(\tH\000\022;\n\ttransform\030\006 "
           + "\001(\0132&.google.firestore.v1.DocumentTransf"
@@ -109,10 +109,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
     com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
         descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
-          com.google.api.AnnotationsProto.getDescriptor(),
           com.google.firestore.v1.CommonProto.getDescriptor(),
           com.google.firestore.v1.DocumentProto.getDescriptor(),
           com.google.protobuf.TimestampProto.getDescriptor(),
+          com.google.api.AnnotationsProto.getDescriptor(),
         },
         assigner);
     internal_static_google_firestore_v1_Write_descriptor = getDescriptor().getMessageTypes().get(0);
@@ -185,10 +185,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
             new java.lang.String[] {
               "TargetId", "Count",
             });
-    com.google.api.AnnotationsProto.getDescriptor();
     com.google.firestore.v1.CommonProto.getDescriptor();
     com.google.firestore.v1.DocumentProto.getDescriptor();
     com.google.protobuf.TimestampProto.getDescriptor();
+    com.google.api.AnnotationsProto.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java
index 303b1acb6496..ae36b7b5edd3 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java
@@ -335,9 +335,9 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) {
    * 
    * A stream token that was previously sent by the server.
    * The client should set this field to the token from the most recent
-   * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This
-   * acknowledges that the client has received responses up to this token. After
-   * sending this token, earlier tokens may not be used anymore.
+   * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
+   * received responses up to this token. After sending this token, earlier
+   * tokens may not be used anymore.
    * The server may close the stream if there are too many unacknowledged
    * responses.
    * Leave this field unset when creating a new stream. To resume a stream at
@@ -1531,9 +1531,9 @@ public java.util.List getWritesBuilderLis
      * 
      * A stream token that was previously sent by the server.
      * The client should set this field to the token from the most recent
-     * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This
-     * acknowledges that the client has received responses up to this token. After
-     * sending this token, earlier tokens may not be used anymore.
+     * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
+     * received responses up to this token. After sending this token, earlier
+     * tokens may not be used anymore.
      * The server may close the stream if there are too many unacknowledged
      * responses.
      * Leave this field unset when creating a new stream. To resume a stream at
@@ -1552,9 +1552,9 @@ public com.google.protobuf.ByteString getStreamToken() {
      * 
      * A stream token that was previously sent by the server.
      * The client should set this field to the token from the most recent
-     * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This
-     * acknowledges that the client has received responses up to this token. After
-     * sending this token, earlier tokens may not be used anymore.
+     * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
+     * received responses up to this token. After sending this token, earlier
+     * tokens may not be used anymore.
      * The server may close the stream if there are too many unacknowledged
      * responses.
      * Leave this field unset when creating a new stream. To resume a stream at
@@ -1579,9 +1579,9 @@ public Builder setStreamToken(com.google.protobuf.ByteString value) {
      * 
      * A stream token that was previously sent by the server.
      * The client should set this field to the token from the most recent
-     * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This
-     * acknowledges that the client has received responses up to this token. After
-     * sending this token, earlier tokens may not be used anymore.
+     * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
+     * received responses up to this token. After sending this token, earlier
+     * tokens may not be used anymore.
      * The server may close the stream if there are too many unacknowledged
      * responses.
      * Leave this field unset when creating a new stream. To resume a stream at
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java
index c084771a4c01..8532f2b02d94 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequestOrBuilder.java
@@ -135,9 +135,9 @@ public interface WriteRequestOrBuilder
    * 
    * A stream token that was previously sent by the server.
    * The client should set this field to the token from the most recent
-   * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This
-   * acknowledges that the client has received responses up to this token. After
-   * sending this token, earlier tokens may not be used anymore.
+   * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has
+   * received responses up to this token. After sending this token, earlier
+   * tokens may not be used anymore.
    * The server may close the stream if there are too many unacknowledged
    * responses.
    * Leave this field unset when creating a new stream. To resume a stream at
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java
index f862bf7abec7..3ce81de7ecdd 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java
@@ -167,9 +167,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    *
    *
    * 
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -181,9 +180,8 @@ public java.util.List getTransformResultsList() { * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -196,9 +194,8 @@ public java.util.List getTransformResultsList() { * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -210,9 +207,8 @@ public int getTransformResultsCount() { * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -224,9 +220,8 @@ public com.google.firestore.v1.Value getTransformResults(int index) { * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -848,9 +843,8 @@ private void ensureTransformResultsIsMutable() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -866,9 +860,8 @@ public java.util.List getTransformResultsList() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -884,9 +877,8 @@ public int getTransformResultsCount() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -902,9 +894,8 @@ public com.google.firestore.v1.Value getTransformResults(int index) { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -926,9 +917,8 @@ public Builder setTransformResults(int index, com.google.firestore.v1.Value valu * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -948,9 +938,8 @@ public Builder setTransformResults( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -972,9 +961,8 @@ public Builder addTransformResults(com.google.firestore.v1.Value value) { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -996,9 +984,8 @@ public Builder addTransformResults(int index, com.google.firestore.v1.Value valu * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1017,9 +1004,8 @@ public Builder addTransformResults(com.google.firestore.v1.Value.Builder builder * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1039,9 +1025,8 @@ public Builder addTransformResults( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1061,9 +1046,8 @@ public Builder addAllTransformResults( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1082,9 +1066,8 @@ public Builder clearTransformResults() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1103,9 +1086,8 @@ public Builder removeTransformResults(int index) { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1117,9 +1099,8 @@ public com.google.firestore.v1.Value.Builder getTransformResultsBuilder(int inde * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1135,9 +1116,8 @@ public com.google.firestore.v1.ValueOrBuilder getTransformResultsOrBuilder(int i * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1154,9 +1134,8 @@ public com.google.firestore.v1.ValueOrBuilder getTransformResultsOrBuilder(int i * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1169,9 +1148,8 @@ public com.google.firestore.v1.Value.Builder addTransformResultsBuilder() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -1184,9 +1162,8 @@ public com.google.firestore.v1.Value.Builder addTransformResultsBuilder(int inde * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1.Value transform_results = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java index 6c22704c6323..c204f2527e71 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResultOrBuilder.java @@ -52,9 +52,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -64,9 +63,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -76,9 +74,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -88,9 +85,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; @@ -101,9 +97,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1.Value transform_results = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/common.proto b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/common.proto index 9a0ae7deae84..59c62997ad0d 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/common.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -28,16 +28,15 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\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]. +// [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. message DocumentMask { - // The list of field paths in the mask. See - // [Document.fields][google.firestore.v1.Document.fields] for a field path - // syntax reference. + // 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; } diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto index 20e30651c00f..d3d9c11c79cf 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A Firestore document. // // Must not exceed 1 MiB - 4 bytes. diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto index 49d22a449049..5dc9667e2ca2 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ option java_outer_classname = "FirestoreProto"; option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; - // Specification of the Firestore API. // The Cloud Firestore service. @@ -94,8 +93,7 @@ service Firestore { // // Documents returned by this method are not guaranteed to be returned in the // same order that they were requested. - rpc BatchGetDocuments(BatchGetDocumentsRequest) - returns (stream BatchGetDocumentsResponse) { + rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { option (google.api.http) = { post: "/v1/{database=projects/*/databases/*}/documents:batchGet" body: "*" @@ -103,8 +101,7 @@ service Firestore { } // Starts a new transaction. - rpc BeginTransaction(BeginTransactionRequest) - returns (BeginTransactionResponse) { + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { option (google.api.http) = { post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" @@ -156,8 +153,7 @@ service Firestore { } // Lists all the collection IDs underneath a document. - rpc ListCollectionIds(ListCollectionIdsRequest) - returns (ListCollectionIdsResponse) { + rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" @@ -169,8 +165,7 @@ service Firestore { } } -// The request for -// [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. +// The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. message GetDocumentRequest { // The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -194,8 +189,7 @@ message GetDocumentRequest { } } -// The request for -// [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +// The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -237,17 +231,15 @@ message ListDocumentsRequest { // If the list should show missing documents. A missing document is a // document that does not exist but has sub-documents. These documents will - // be returned with a key but will not have fields, - // [Document.create_time][google.firestore.v1.Document.create_time], or - // [Document.update_time][google.firestore.v1.Document.update_time] set. + // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + // or [Document.update_time][google.firestore.v1.Document.update_time] set. // // Requests with `show_missing` may not specify `where` or // `order_by`. bool show_missing = 12; } -// The response for -// [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +// The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsResponse { // The Documents found. repeated Document documents = 1; @@ -256,8 +248,7 @@ message ListDocumentsResponse { string next_page_token = 2; } -// The request for -// [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. +// The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. message CreateDocumentRequest { // The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or @@ -282,8 +273,7 @@ message CreateDocumentRequest { DocumentMask mask = 5; } -// The request for -// [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. +// The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. message UpdateDocumentRequest { // The updated document. // Creates the document if it does not already exist. @@ -309,8 +299,7 @@ message UpdateDocumentRequest { Precondition current_document = 4; } -// The request for -// [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. +// The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. message DeleteDocumentRequest { // The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -321,8 +310,7 @@ message DeleteDocumentRequest { Precondition current_document = 2; } -// The request for -// [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +// The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -358,8 +346,7 @@ message BatchGetDocumentsRequest { } } -// The streamed response for -// [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsResponse { // A single result. // This can be empty if the server is just returning a transaction. @@ -374,8 +361,7 @@ message BatchGetDocumentsResponse { // 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. + // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. bytes transaction = 3; // The time at which the document was read. @@ -385,8 +371,7 @@ message BatchGetDocumentsResponse { google.protobuf.Timestamp read_time = 4; } -// The request for -// [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +// The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -397,8 +382,7 @@ message BeginTransactionRequest { TransactionOptions options = 2; } -// The response for -// [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +// The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionResponse { // The transaction that was started. bytes transaction = 1; @@ -475,14 +459,12 @@ message RunQueryRequest { } } -// The response for -// [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. +// The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. message RunQueryResponse { // The transaction that was started as part of this request. // Can only be set in the first response, and only if - // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - // was set in the request. If set, no other fields will be set in this - // response. + // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + // If set, no other fields will be set in this response. bytes transaction = 2; // A query result. @@ -535,9 +517,9 @@ message WriteRequest { // A stream token that was previously sent by the server. // // The client should set this field to the token from the most recent - // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - // acknowledges that the client has received responses up to this token. After - // sending this token, earlier tokens may not be used anymore. + // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + // received responses up to this token. After sending this token, earlier + // tokens may not be used anymore. // // The server may close the stream if there are too many unacknowledged // responses. @@ -606,8 +588,8 @@ message ListenResponse { // A [Document][google.firestore.v1.Document] has been deleted. DocumentDelete document_delete = 4; - // A [Document][google.firestore.v1.Document] has been removed from a target - // (because it is no longer relevant to that target). + // A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer + // relevant to that target). DocumentRemove document_remove = 6; // A filter to apply to the set of documents previously returned for the @@ -661,8 +643,7 @@ message Target { // If not specified, all matching Documents are returned before any // subsequent changes. oneof resume_type { - // A resume token from a prior - // [TargetChange][google.firestore.v1.TargetChange] for an identical target. + // A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. // // Using a resume token with a different target is unsupported and may fail. bytes resume_token = 4; @@ -754,8 +735,7 @@ message TargetChange { google.protobuf.Timestamp read_time = 6; } -// The request for -// [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +// The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { // The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -771,8 +751,7 @@ message ListCollectionIdsRequest { string page_token = 3; } -// The response from -// [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +// The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsResponse { // The collection ids. repeated string collection_ids = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto index a2b4c10fcb82..48684c06079d 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/firestore/v1/document.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -29,6 +29,7 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A Firestore query. message StructuredQuery { // A selection of a collection, such as `messages as m1`. @@ -138,6 +139,11 @@ message StructuredQuery { } } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + // An order on a field. message Order { // The field to order by. @@ -147,11 +153,6 @@ message StructuredQuery { Direction direction = 2; } - // A reference to a field, such as `max(messages.time) as max_time`. - message FieldReference { - string field_path = 2; - } - // The projection of document's fields to return. message Projection { // The fields to return. diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto index 70bb74d2344a..4ab5d833e3b9 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/write.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/firestore/v1/common.proto"; import "google/firestore/v1/document.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A write on a document. message Write { // The operation to execute. @@ -41,7 +42,7 @@ message Write { // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. string delete = 2; - // Applies a tranformation to a document. + // Applies a transformation to a document. // At most one `transform` per document is allowed in a given request. // An `update` cannot follow a `transform` on the same document in a given // request. @@ -80,9 +81,8 @@ message DocumentTransform { REQUEST_TIME = 1; } - // The path of the field. See - // [Document.fields][google.firestore.v1.Document.fields] for the field path - // syntax reference. + // The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + // reference. string field_path = 1; // The transformation to apply on the field. @@ -176,20 +176,18 @@ message WriteResult { // previous update_time. google.protobuf.Timestamp update_time = 1; - // The results of applying each - // [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - // in the same order. + // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + // same order. repeated Value transform_results = 2; } // 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]. +// 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. +// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical +// change, if multiple targets are affected. message DocumentChange { // The new state of the [Document][google.firestore.v1.Document]. // @@ -205,15 +203,13 @@ message DocumentChange { // 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]. +// 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. +// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical +// delete, if multiple targets are affected. message DocumentDelete { - // The resource name of the [Document][google.firestore.v1.Document] that was - // deleted. + // The resource name of the [Document][google.firestore.v1.Document] that was deleted. string document = 1; // A set of target IDs for targets that previously matched this entity. @@ -225,19 +221,16 @@ message DocumentDelete { google.protobuf.Timestamp read_time = 4; } -// A [Document][google.firestore.v1.Document] has been removed from the view of -// the targets. +// A [Document][google.firestore.v1.Document] has been removed from the view of the targets. // // Sent if the document is no longer relevant to a target and is out of view. // Can be sent instead of a DocumentDelete or a DocumentChange if the server // can not send the new value of the document. // -// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be -// returned for the same logical write or delete, if multiple targets are -// affected. +// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical +// write or delete, if multiple targets are affected. message DocumentRemove { - // The resource name of the [Document][google.firestore.v1.Document] that has - // gone out of view. + // The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. string document = 1; // A set of target IDs for targets that previously matched this document. @@ -254,8 +247,7 @@ message ExistenceFilter { // The target ID to which this filter applies. int32 target_id = 1; - // The total count of documents that match - // [target_id][google.firestore.v1.ExistenceFilter.target_id]. + // The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. // // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java index b6ddb82072d7..26c9ea6d78d4 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+ * The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
  * 
* * Protobuf type {@code google.firestore.v1beta1.BatchGetDocumentsRequest} @@ -727,8 +726,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+   * The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
    * 
* * Protobuf type {@code google.firestore.v1beta1.BatchGetDocumentsRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java index d5a964c8fd4f..f8e358aef158 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java @@ -7,8 +7,7 @@ * * *
- * The streamed response for
- * [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+ * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
  * 
* * Protobuf type {@code google.firestore.v1beta1.BatchGetDocumentsResponse} @@ -274,8 +273,7 @@ public 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.v1beta1.BatchGetDocumentsRequest.new_transaction]
-   * was set in the request.
+   * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
    * 
* * bytes transaction = 3; @@ -549,8 +547,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The streamed response for
-   * [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+   * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
    * 
* * Protobuf type {@code google.firestore.v1beta1.BatchGetDocumentsResponse} @@ -1079,8 +1076,7 @@ public Builder setMissingBytes(com.google.protobuf.ByteString value) { *
      * 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.v1beta1.BatchGetDocumentsRequest.new_transaction]
-     * was set in the request.
+     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
      * 
* * bytes transaction = 3; @@ -1094,8 +1090,7 @@ public com.google.protobuf.ByteString getTransaction() { *
      * 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.v1beta1.BatchGetDocumentsRequest.new_transaction]
-     * was set in the request.
+     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
      * 
* * bytes transaction = 3; @@ -1115,8 +1110,7 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { *
      * 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.v1beta1.BatchGetDocumentsRequest.new_transaction]
-     * was set in the request.
+     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
      * 
* * bytes transaction = 3; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponseOrBuilder.java index ad8cc09e83fe..28038e7c8e33 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponseOrBuilder.java @@ -68,8 +68,7 @@ public interface BatchGetDocumentsResponseOrBuilder *
    * 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.v1beta1.BatchGetDocumentsRequest.new_transaction]
-   * was set in the request.
+   * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
    * 
* * bytes transaction = 3; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java index c1359e569345..447eaa63932b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+ * The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
  * 
* * Protobuf type {@code google.firestore.v1beta1.BeginTransactionRequest} @@ -375,8 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+   * The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
    * 
* * Protobuf type {@code google.firestore.v1beta1.BeginTransactionRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java index 2a80a8411751..d72489e45ea9 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+ * The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
  * 
* * Protobuf type {@code google.firestore.v1beta1.BeginTransactionResponse} @@ -270,8 +269,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+   * The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
    * 
* * Protobuf type {@code google.firestore.v1beta1.BeginTransactionResponse} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java index 5c70de79859c..223657b179a0 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+ * The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
  * 
* * Protobuf type {@code google.firestore.v1beta1.CommitRequest} @@ -427,8 +426,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+   * The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
    * 
* * Protobuf type {@code google.firestore.v1beta1.CommitRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java index dde77e6eae11..6f4e4f675047 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+ * The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
  * 
* * Protobuf type {@code google.firestore.v1beta1.CommitResponse} @@ -408,8 +407,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+   * The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
    * 
* * Protobuf type {@code google.firestore.v1beta1.CommitResponse} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java index d1f0dd0871ed..f547352d658f 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommonProto.java @@ -42,9 +42,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n%google/firestore/v1beta1/common.proto\022" - + "\030google.firestore.v1beta1\032\034google/api/an" - + "notations.proto\032\037google/protobuf/timesta" - + "mp.proto\"#\n\014DocumentMask\022\023\n\013field_paths\030" + + "\030google.firestore.v1beta1\032\037google/protob" + + "uf/timestamp.proto\032\034google/api/annotatio" + + "ns.proto\"#\n\014DocumentMask\022\023\n\013field_paths\030" + "\001 \003(\t\"e\n\014Precondition\022\020\n\006exists\030\001 \001(\010H\000\022" + "1\n\013update_time\030\002 \001(\0132\032.google.protobuf.T" + "imestampH\000B\020\n\016condition_type\"\263\002\n\022Transac" @@ -73,8 +73,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1beta1_DocumentMask_descriptor = @@ -121,8 +121,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "ReadTime", "ConsistencySelector", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java index 49770cb58bd9..63a7314008e3 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
+ * The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
  * 
* * Protobuf type {@code google.firestore.v1beta1.CreateDocumentRequest} @@ -571,8 +570,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
+   * The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
    * 
* * Protobuf type {@code google.firestore.v1beta1.CreateDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java index 8c3088aebd94..22d4f63166c9 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
+ * The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
  * 
* * Protobuf type {@code google.firestore.v1beta1.DeleteDocumentRequest} @@ -375,8 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
+   * The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
    * 
* * Protobuf type {@code google.firestore.v1beta1.DeleteDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java index 1af0bc22c598..9a3ed07ab98b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java @@ -8,12 +8,10 @@ * *
  * A [Document][google.firestore.v1beta1.Document] has changed.
- * May be the result of multiple [writes][google.firestore.v1beta1.Write],
- * including deletes, that ultimately resulted in a new value for the
- * [Document][google.firestore.v1beta1.Document].
- * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages
- * may be returned for the same logical change, if multiple targets are
- * affected.
+ * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
+ * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
+ * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
+ * change, if multiple targets are affected.
  * 
* * Protobuf type {@code google.firestore.v1beta1.DocumentChange} @@ -508,12 +506,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A [Document][google.firestore.v1beta1.Document] has changed.
-   * May be the result of multiple [writes][google.firestore.v1beta1.Write],
-   * including deletes, that ultimately resulted in a new value for the
-   * [Document][google.firestore.v1beta1.Document].
-   * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages
-   * may be returned for the same logical change, if multiple targets are
-   * affected.
+   * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
+   * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
+   * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
+   * change, if multiple targets are affected.
    * 
* * Protobuf type {@code google.firestore.v1beta1.DocumentChange} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java index f86e05d63eb8..1fa5c97df7c7 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java @@ -8,12 +8,10 @@ * *
  * A [Document][google.firestore.v1beta1.Document] has been deleted.
- * May be the result of multiple [writes][google.firestore.v1beta1.Write],
- * including updates, the last of which deleted the
- * [Document][google.firestore.v1beta1.Document].
- * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages
- * may be returned for the same logical delete, if multiple targets are
- * affected.
+ * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
+ * last of which deleted the [Document][google.firestore.v1beta1.Document].
+ * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
+ * delete, if multiple targets are affected.
  * 
* * Protobuf type {@code google.firestore.v1beta1.DocumentDelete} @@ -147,8 +145,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * was deleted.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
    * 
* * string document = 1; @@ -168,8 +165,7 @@ public java.lang.String getDocument() { * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * was deleted.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
    * 
* * string document = 1; @@ -474,12 +470,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A [Document][google.firestore.v1beta1.Document] has been deleted.
-   * May be the result of multiple [writes][google.firestore.v1beta1.Write],
-   * including updates, the last of which deleted the
-   * [Document][google.firestore.v1beta1.Document].
-   * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages
-   * may be returned for the same logical delete, if multiple targets are
-   * affected.
+   * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
+   * last of which deleted the [Document][google.firestore.v1beta1.Document].
+   * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
+   * delete, if multiple targets are affected.
    * 
* * Protobuf type {@code google.firestore.v1beta1.DocumentDelete} @@ -673,8 +667,7 @@ public Builder mergeFrom( * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * was deleted.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
      * 
* * string document = 1; @@ -694,8 +687,7 @@ public java.lang.String getDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * was deleted.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
      * 
* * string document = 1; @@ -715,8 +707,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * was deleted.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
      * 
* * string document = 1; @@ -734,8 +725,7 @@ public Builder setDocument(java.lang.String value) { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * was deleted.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
      * 
* * string document = 1; @@ -750,8 +740,7 @@ public Builder clearDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * was deleted.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
      * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java index fa637b271ed4..158818ddf7fd 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDeleteOrBuilder.java @@ -12,8 +12,7 @@ public interface DocumentDeleteOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * was deleted.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
    * 
* * string document = 1; @@ -23,8 +22,7 @@ public interface DocumentDeleteOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * was deleted.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
    * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java index 268dea63273b..5a508a77a26c 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMask.java @@ -11,8 +11,7 @@ * Used to restrict a get or update operation on a document to a subset of its * fields. * This is different from standard field masks, as this is always scoped to a - * [Document][google.firestore.v1beta1.Document], and takes in account the - * dynamic nature of [Value][google.firestore.v1beta1.Value]. + * [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value]. *
* * Protobuf type {@code google.firestore.v1beta1.DocumentMask} @@ -108,8 +107,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -122,8 +120,7 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -136,8 +133,7 @@ public int getFieldPathsCount() { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -150,8 +146,7 @@ public java.lang.String getFieldPaths(int index) { * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -336,8 +331,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Used to restrict a get or update operation on a document to a subset of its * fields. * This is different from standard field masks, as this is always scoped to a - * [Document][google.firestore.v1beta1.Document], and takes in account the - * dynamic nature of [Value][google.firestore.v1beta1.Value]. + * [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value]. *
* * Protobuf type {@code google.firestore.v1beta1.DocumentMask} @@ -516,8 +510,7 @@ private void ensureFieldPathsIsMutable() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -530,8 +523,7 @@ public com.google.protobuf.ProtocolStringList getFieldPathsList() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -544,8 +536,7 @@ public int getFieldPathsCount() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -558,8 +549,7 @@ public java.lang.String getFieldPaths(int index) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -572,8 +562,7 @@ public com.google.protobuf.ByteString getFieldPathsBytes(int index) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -592,8 +581,7 @@ public Builder setFieldPaths(int index, java.lang.String value) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -612,8 +600,7 @@ public Builder addFieldPaths(java.lang.String value) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -629,8 +616,7 @@ public Builder addAllFieldPaths(java.lang.Iterable values) { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* @@ -646,8 +632,7 @@ public Builder clearFieldPaths() { * * *
-     * The list of field paths in the mask. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+     * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
      * path syntax reference.
      * 
* diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java index 7916bb25a8d4..3e594f6af815 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentMaskOrBuilder.java @@ -12,8 +12,7 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -24,8 +23,7 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -36,8 +34,7 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* @@ -48,8 +45,7 @@ public interface DocumentMaskOrBuilder * * *
-   * The list of field paths in the mask. See
-   * [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+   * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
    * path syntax reference.
    * 
* diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java index 56285de6f75a..eeb6dac6279b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentProto.java @@ -46,10 +46,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\'google/firestore/v1beta1/document.prot" - + "o\022\030google.firestore.v1beta1\032\034google/api/" - + "annotations.proto\032\034google/protobuf/struc" - + "t.proto\032\037google/protobuf/timestamp.proto" - + "\032\030google/type/latlng.proto\"\212\002\n\010Document\022" + + "o\022\030google.firestore.v1beta1\032\034google/prot" + + "obuf/struct.proto\032\037google/protobuf/times" + + "tamp.proto\032\030google/type/latlng.proto\032\034go" + + "ogle/api/annotations.proto\"\212\002\n\010Document\022" + "\014\n\004name\030\001 \001(\t\022>\n\006fields\030\002 \003(\0132..google.f" + "irestore.v1beta1.Document.FieldsEntry\022/\n" + "\013create_time\030\003 \001(\0132\032.google.protobuf.Tim" @@ -90,10 +90,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.type.LatLngProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1beta1_Document_descriptor = @@ -155,10 +155,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Key", "Value", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.type.LatLngProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java index 0fbfa17e9fb7..ab7d5e16d236 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java @@ -7,14 +7,12 @@ * * *
- * A [Document][google.firestore.v1beta1.Document] has been removed from the
- * view of the targets.
+ * A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
  * Sent if the document is no longer relevant to a target and is out of view.
  * Can be sent instead of a DocumentDelete or a DocumentChange if the server
  * can not send the new value of the document.
- * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages
- * may be returned for the same logical write or delete, if multiple targets are
- * affected.
+ * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
+ * write or delete, if multiple targets are affected.
  * 
* * Protobuf type {@code google.firestore.v1beta1.DocumentRemove} @@ -148,8 +146,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * has gone out of view.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
    * 
* * string document = 1; @@ -169,8 +166,7 @@ public java.lang.String getDocument() { * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * has gone out of view.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
    * 
* * string document = 1; @@ -474,14 +470,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from the
-   * view of the targets.
+   * A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
    * Sent if the document is no longer relevant to a target and is out of view.
    * Can be sent instead of a DocumentDelete or a DocumentChange if the server
    * can not send the new value of the document.
-   * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages
-   * may be returned for the same logical write or delete, if multiple targets are
-   * affected.
+   * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
+   * write or delete, if multiple targets are affected.
    * 
* * Protobuf type {@code google.firestore.v1beta1.DocumentRemove} @@ -675,8 +669,7 @@ public Builder mergeFrom( * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * has gone out of view.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -696,8 +689,7 @@ public java.lang.String getDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * has gone out of view.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -717,8 +709,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * has gone out of view.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -736,8 +727,7 @@ public Builder setDocument(java.lang.String value) { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * has gone out of view.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
      * 
* * string document = 1; @@ -752,8 +742,7 @@ public Builder clearDocument() { * * *
-     * The resource name of the [Document][google.firestore.v1beta1.Document] that
-     * has gone out of view.
+     * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
      * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemoveOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemoveOrBuilder.java index 36483f17c749..fd077a70c5a2 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemoveOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemoveOrBuilder.java @@ -12,8 +12,7 @@ public interface DocumentRemoveOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * has gone out of view.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
    * 
* * string document = 1; @@ -23,8 +22,7 @@ public interface DocumentRemoveOrBuilder * * *
-   * The resource name of the [Document][google.firestore.v1beta1.Document] that
-   * has gone out of view.
+   * The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
    * 
* * string document = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java index a70eb8b241c9..06581b27b1a1 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java @@ -118,9 +118,8 @@ public interface FieldTransformOrBuilder * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-     * path syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -130,9 +129,8 @@ public interface FieldTransformOrBuilder * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-     * path syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -816,9 +814,8 @@ public TransformTypeCase getTransformTypeCase() { * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-     * path syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -838,9 +835,8 @@ public java.lang.String getFieldPath() { * * *
-     * The path of the field. See
-     * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-     * path syntax reference.
+     * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+     * reference.
      * 
* * string field_path = 1; @@ -1777,9 +1773,8 @@ public Builder clearTransformType() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-       * path syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1799,9 +1794,8 @@ public java.lang.String getFieldPath() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-       * path syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1821,9 +1815,8 @@ public com.google.protobuf.ByteString getFieldPathBytes() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-       * path syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1841,9 +1834,8 @@ public Builder setFieldPath(java.lang.String value) { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-       * path syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; @@ -1858,9 +1850,8 @@ public Builder clearFieldPath() { * * *
-       * The path of the field. See
-       * [Document.fields][google.firestore.v1beta1.Document.fields] for the field
-       * path syntax reference.
+       * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+       * reference.
        * 
* * string field_path = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java index 1e370991860c..9583f51e2b01 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java @@ -116,8 +116,7 @@ public int getTargetId() { * * *
-   * The total count of documents that match
-   * [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+   * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
    * If different from the count of documents in the client that match, the
    * client must manually determine which documents no longer match the target.
    * 
@@ -508,8 +507,7 @@ public Builder clearTargetId() { * * *
-     * The total count of documents that match
-     * [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+     * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
      * If different from the count of documents in the client that match, the
      * client must manually determine which documents no longer match the target.
      * 
@@ -523,8 +521,7 @@ public int getCount() { * * *
-     * The total count of documents that match
-     * [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+     * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
      * If different from the count of documents in the client that match, the
      * client must manually determine which documents no longer match the target.
      * 
@@ -541,8 +538,7 @@ public Builder setCount(int value) { * * *
-     * The total count of documents that match
-     * [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+     * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
      * If different from the count of documents in the client that match, the
      * client must manually determine which documents no longer match the target.
      * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilterOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilterOrBuilder.java index f0d84a6c599c..9154d0314489 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilterOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilterOrBuilder.java @@ -23,8 +23,7 @@ public interface ExistenceFilterOrBuilder * * *
-   * The total count of documents that match
-   * [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+   * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
    * If different from the count of documents in the client that match, the
    * client must manually determine which documents no longer match the target.
    * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java index 60c8880cd49f..0627b32b93e4 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
+ * The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
  * 
* * Protobuf type {@code google.firestore.v1beta1.GetDocumentRequest} @@ -541,8 +540,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
+   * The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
    * 
* * Protobuf type {@code google.firestore.v1beta1.GetDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java index e8006bf89242..9b878725d386 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+ * The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
  * 
* * Protobuf type {@code google.firestore.v1beta1.ListCollectionIdsRequest} @@ -398,8 +397,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+   * The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
    * 
* * Protobuf type {@code google.firestore.v1beta1.ListCollectionIdsRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java index 5f78c7eb40cc..3f5c4a7f84fd 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java @@ -7,8 +7,7 @@ * * *
- * The response from
- * [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+ * The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
  * 
* * Protobuf type {@code google.firestore.v1beta1.ListCollectionIdsResponse} @@ -382,8 +381,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response from
-   * [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+   * The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
    * 
* * Protobuf type {@code google.firestore.v1beta1.ListCollectionIdsResponse} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java index 1759aee60bf3..9cb472880599 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+ * The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
  * 
* * Protobuf type {@code google.firestore.v1beta1.ListDocumentsRequest} @@ -521,9 +520,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { *
    * If the list should show missing documents. A missing document is a
    * document that does not exist but has sub-documents. These documents will
-   * be returned with a key but will not have fields,
-   * [Document.create_time][google.firestore.v1beta1.Document.create_time], or
-   * [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+   * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+   * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
    * Requests with `show_missing` may not specify `where` or
    * `order_by`.
    * 
@@ -797,8 +795,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+   * The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
    * 
* * Protobuf type {@code google.firestore.v1beta1.ListDocumentsRequest} @@ -1960,9 +1957,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { *
      * If the list should show missing documents. A missing document is a
      * document that does not exist but has sub-documents. These documents will
-     * be returned with a key but will not have fields,
-     * [Document.create_time][google.firestore.v1beta1.Document.create_time], or
-     * [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+     * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+     * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
      * Requests with `show_missing` may not specify `where` or
      * `order_by`.
      * 
@@ -1978,9 +1974,8 @@ public boolean getShowMissing() { *
      * If the list should show missing documents. A missing document is a
      * document that does not exist but has sub-documents. These documents will
-     * be returned with a key but will not have fields,
-     * [Document.create_time][google.firestore.v1beta1.Document.create_time], or
-     * [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+     * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+     * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
      * Requests with `show_missing` may not specify `where` or
      * `order_by`.
      * 
@@ -1999,9 +1994,8 @@ public Builder setShowMissing(boolean value) { *
      * If the list should show missing documents. A missing document is a
      * document that does not exist but has sub-documents. These documents will
-     * be returned with a key but will not have fields,
-     * [Document.create_time][google.firestore.v1beta1.Document.create_time], or
-     * [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+     * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+     * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
      * Requests with `show_missing` may not specify `where` or
      * `order_by`.
      * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequestOrBuilder.java index c8449591d75f..02bd483dd651 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequestOrBuilder.java @@ -203,9 +203,8 @@ public interface ListDocumentsRequestOrBuilder *
    * If the list should show missing documents. A missing document is a
    * document that does not exist but has sub-documents. These documents will
-   * be returned with a key but will not have fields,
-   * [Document.create_time][google.firestore.v1beta1.Document.create_time], or
-   * [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+   * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+   * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
    * Requests with `show_missing` may not specify `where` or
    * `order_by`.
    * 
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java index 55e43a07436e..b1fd71813834 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+ * The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
  * 
* * Protobuf type {@code google.firestore.v1beta1.ListDocumentsResponse} @@ -390,8 +389,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+   * The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
    * 
* * Protobuf type {@code google.firestore.v1beta1.ListDocumentsResponse} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java index a404c6f3e1bc..c9ed0f5feb5d 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
+ * The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
  * 
* * Protobuf type {@code google.firestore.v1beta1.ListenResponse} @@ -354,8 +353,8 @@ public com.google.firestore.v1beta1.DocumentDeleteOrBuilder getDocumentDeleteOrB * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from a
-   * target (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -367,8 +366,8 @@ public boolean hasDocumentRemove() { * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from a
-   * target (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -383,8 +382,8 @@ public com.google.firestore.v1beta1.DocumentRemove getDocumentRemove() { * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from a
-   * target (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -689,8 +688,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
+   * The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
    * 
* * Protobuf type {@code google.firestore.v1beta1.ListenResponse} @@ -1534,8 +1532,8 @@ public com.google.firestore.v1beta1.DocumentDeleteOrBuilder getDocumentDeleteOrB * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1547,8 +1545,8 @@ public boolean hasDocumentRemove() { * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1570,8 +1568,8 @@ public com.google.firestore.v1beta1.DocumentRemove getDocumentRemove() { * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1593,8 +1591,8 @@ public Builder setDocumentRemove(com.google.firestore.v1beta1.DocumentRemove val * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1614,8 +1612,8 @@ public Builder setDocumentRemove( * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1646,8 +1644,8 @@ public Builder mergeDocumentRemove(com.google.firestore.v1beta1.DocumentRemove v * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1672,8 +1670,8 @@ public Builder clearDocumentRemove() { * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1685,8 +1683,8 @@ public com.google.firestore.v1beta1.DocumentRemove.Builder getDocumentRemoveBuil * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -1705,8 +1703,8 @@ public com.google.firestore.v1beta1.DocumentRemoveOrBuilder getDocumentRemoveOrB * * *
-     * A [Document][google.firestore.v1beta1.Document] has been removed from a
-     * target (because it is no longer relevant to that target).
+     * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+     * relevant to that target).
      * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponseOrBuilder.java index 142278ac81c3..b926e9397c0b 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponseOrBuilder.java @@ -105,8 +105,8 @@ public interface ListenResponseOrBuilder * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from a
-   * target (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -116,8 +116,8 @@ public interface ListenResponseOrBuilder * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from a
-   * target (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; @@ -127,8 +127,8 @@ public interface ListenResponseOrBuilder * * *
-   * A [Document][google.firestore.v1beta1.Document] has been removed from a
-   * target (because it is no longer relevant to that target).
+   * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+   * relevant to that target).
    * 
* * .google.firestore.v1beta1.DocumentRemove document_remove = 6; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/QueryProto.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/QueryProto.java index 7c78b9f1d226..5f2b9c1d1392 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/QueryProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/QueryProto.java @@ -32,6 +32,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1beta1_StructuredQuery_FieldFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1beta1_StructuredQuery_FieldFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -44,10 +48,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1beta1_Cursor_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -62,9 +62,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n$google/firestore/v1beta1/query.proto\022\030" - + "google.firestore.v1beta1\032\034google/api/ann" - + "otations.proto\032\'google/firestore/v1beta1" - + "/document.proto\032\036google/protobuf/wrapper" + + "google.firestore.v1beta1\032\'google/firesto" + + "re/v1beta1/document.proto\032\036google/protob" + + "uf/wrappers.proto\032\034google/api/annotation" + "s.proto\"\271\017\n\017StructuredQuery\022D\n\006select\030\001 " + "\001(\01324.google.firestore.v1beta1.Structure" + "dQuery.Projection\022J\n\004from\030\002 \003(\0132<.google" @@ -99,20 +99,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Operator\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\r\n\tLE" + "SS_THAN\020\001\022\026\n\022LESS_THAN_OR_EQUAL\020\002\022\020\n\014GRE" + "ATER_THAN\020\003\022\031\n\025GREATER_THAN_OR_EQUAL\020\004\022\t" - + "\n\005EQUAL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\032\363\001\n\013UnaryF" - + "ilter\022J\n\002op\030\001 \001(\0162>.google.firestore.v1b" - + "eta1.StructuredQuery.UnaryFilter.Operato" - + "r\022I\n\005field\030\002 \001(\01328.google.firestore.v1be" - + "ta1.StructuredQuery.FieldReferenceH\000\"=\n\010" - + "Operator\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\n\n\006IS" - + "_NAN\020\002\022\013\n\007IS_NULL\020\003B\016\n\014operand_type\032\230\001\n\005" - + "Order\022G\n\005field\030\001 \001(\01328.google.firestore." - + "v1beta1.StructuredQuery.FieldReference\022F" - + "\n\tdirection\030\002 \001(\01623.google.firestore.v1b" - + "eta1.StructuredQuery.Direction\032$\n\016FieldR" - + "eference\022\022\n\nfield_path\030\002 \001(\t\032V\n\nProjecti" - + "on\022H\n\006fields\030\002 \003(\01328.google.firestore.v1" - + "beta1.StructuredQuery.FieldReference\"E\n\t" + + "\n\005EQUAL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\032V\n\nProject" + + "ion\022H\n\006fields\030\002 \003(\01328.google.firestore.v" + + "1beta1.StructuredQuery.FieldReference\032\363\001" + + "\n\013UnaryFilter\022J\n\002op\030\001 \001(\0162>.google.fires" + + "tore.v1beta1.StructuredQuery.UnaryFilter" + + ".Operator\022I\n\005field\030\002 \001(\01328.google.firest" + + "ore.v1beta1.StructuredQuery.FieldReferen" + + "ceH\000\"=\n\010Operator\022\030\n\024OPERATOR_UNSPECIFIED" + + "\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NULL\020\003B\016\n\014operand_t" + + "ype\032\230\001\n\005Order\022G\n\005field\030\001 \001(\01328.google.fi" + + "restore.v1beta1.StructuredQuery.FieldRef" + + "erence\022F\n\tdirection\030\002 \001(\01623.google.fires" + + "tore.v1beta1.StructuredQuery.Direction\032$" + + "\n\016FieldReference\022\022\n\nfield_path\030\002 \001(\t\"E\n\t" + "Direction\022\031\n\025DIRECTION_UNSPECIFIED\020\000\022\r\n\t" + "ASCENDING\020\001\022\016\n\nDESCENDING\020\002\"I\n\006Cursor\022/\n" + "\006values\030\001 \003(\0132\037.google.firestore.v1beta1" @@ -134,9 +134,9 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.firestore.v1beta1.DocumentProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1beta1_StructuredQuery_descriptor = @@ -179,8 +179,16 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Field", "Op", "Value", }); - internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor = + internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor = internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(4); + internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor, + new java.lang.String[] { + "Fields", + }); + internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor = + internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(5); internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor, @@ -188,7 +196,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "Op", "Field", "OperandType", }); internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor = - internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(5); + internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(6); internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor, @@ -196,21 +204,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "Field", "Direction", }); internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor = - internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(6); + internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(7); internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor, new java.lang.String[] { "FieldPath", }); - internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor = - internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(7); - internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor, - new java.lang.String[] { - "Fields", - }); internal_static_google_firestore_v1beta1_Cursor_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_firestore_v1beta1_Cursor_fieldAccessorTable = @@ -219,9 +219,9 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Values", "Before", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.firestore.v1beta1.DocumentProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java index c3943a5818ab..e6a1c1a66f58 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
+ * The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
  * 
* * Protobuf type {@code google.firestore.v1beta1.RollbackRequest} @@ -331,8 +330,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
+   * The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
    * 
* * Protobuf type {@code google.firestore.v1beta1.RollbackRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java index ba5e8659f125..14d3a31702cd 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+ * The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
  * 
* * Protobuf type {@code google.firestore.v1beta1.RunQueryRequest} @@ -688,8 +687,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+   * The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
    * 
* * Protobuf type {@code google.firestore.v1beta1.RunQueryRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java index 0340bf1911c8..40c97c5d1b5f 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java @@ -7,8 +7,7 @@ * * *
- * The response for
- * [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+ * The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
  * 
* * Protobuf type {@code google.firestore.v1beta1.RunQueryResponse} @@ -135,9 +134,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * The transaction that was started as part of this request.
    * Can only be set in the first response, and only if
-   * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction]
-   * was set in the request. If set, no other fields will be set in this
-   * response.
+   * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+   * If set, no other fields will be set in this response.
    * 
* * bytes transaction = 2; @@ -461,8 +459,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for
-   * [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+   * The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
    * 
* * Protobuf type {@code google.firestore.v1beta1.RunQueryResponse} @@ -655,9 +652,8 @@ public Builder mergeFrom( *
      * The transaction that was started as part of this request.
      * Can only be set in the first response, and only if
-     * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction]
-     * was set in the request. If set, no other fields will be set in this
-     * response.
+     * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+     * If set, no other fields will be set in this response.
      * 
* * bytes transaction = 2; @@ -671,9 +667,8 @@ public com.google.protobuf.ByteString getTransaction() { *
      * The transaction that was started as part of this request.
      * Can only be set in the first response, and only if
-     * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction]
-     * was set in the request. If set, no other fields will be set in this
-     * response.
+     * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+     * If set, no other fields will be set in this response.
      * 
* * bytes transaction = 2; @@ -693,9 +688,8 @@ public Builder setTransaction(com.google.protobuf.ByteString value) { *
      * The transaction that was started as part of this request.
      * Can only be set in the first response, and only if
-     * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction]
-     * was set in the request. If set, no other fields will be set in this
-     * response.
+     * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+     * If set, no other fields will be set in this response.
      * 
* * bytes transaction = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponseOrBuilder.java index 9c6512afc6b5..d495c560d19c 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponseOrBuilder.java @@ -14,9 +14,8 @@ public interface RunQueryResponseOrBuilder *
    * The transaction that was started as part of this request.
    * Can only be set in the first response, and only if
-   * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction]
-   * was set in the request. If set, no other fields will be set in this
-   * response.
+   * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+   * If set, no other fields will be set in this response.
    * 
* * bytes transaction = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java index 5ef6c14e16df..41b541416a8c 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java @@ -5385,87 +5385,95 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldFilter getDefaultInstan } } - public interface UnaryFilterOrBuilder + public interface ProjectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Projection) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The unary operator to apply.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - int getOpValue(); + java.util.List getFieldsList(); /** * * *
-     * The unary operator to apply.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp(); - + com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index); /** * * *
-     * The field to which to apply the operator.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - boolean hasField(); + int getFieldsCount(); /** * * *
-     * The field to which to apply the operator.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); + java.util.List + getFieldsOrBuilderList(); /** * * *
-     * The field to which to apply the operator.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); - - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.OperandTypeCase - getOperandTypeCase(); + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( + int index); } /** * * *
-   * A filter with a single operand.
+   * The projection of document's fields to return.
    * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} */ - public static final class UnaryFilter extends com.google.protobuf.GeneratedMessageV3 + public static final class Projection extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.UnaryFilter) - UnaryFilterOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.Projection) + ProjectionOrBuilder { private static final long serialVersionUID = 0L; - // Use UnaryFilter.newBuilder() to construct. - private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Projection.newBuilder() to construct. + private Projection(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private UnaryFilter() { - op_ = 0; + private Projection() { + fields_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -5473,7 +5481,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UnaryFilter( + private Projection( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5492,32 +5500,18 @@ private UnaryFilter( case 0: done = true; break; - case 8: - { - int rawValue = input.readEnum(); - - op_ = rawValue; - break; - } case 18: { - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder subBuilder = - null; - if (operandTypeCase_ == 2) { - subBuilder = - ((com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_) - .toBuilder(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + fields_ = + new java.util.ArrayList< + com.google.firestore.v1beta1.StructuredQuery.FieldReference>(); + mutable_bitField0_ |= 0x00000001; } - operandType_ = + fields_.add( input.readMessage( com.google.firestore.v1beta1.StructuredQuery.FieldReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); - operandType_ = subBuilder.buildPartial(); - } - operandTypeCase_ = 2; + extensionRegistry)); break; } default: @@ -5534,6 +5528,9 @@ private UnaryFilter( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -5541,287 +5538,103 @@ private UnaryFilter( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Projection.class, + com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); } + public static final int FIELDS_FIELD_NUMBER = 2; + private java.util.List fields_; /** * * *
-     * A unary operator.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * Protobuf enum {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator} + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public enum Operator implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Unspecified. This value must not be used.
-       * 
- * - * OPERATOR_UNSPECIFIED = 0; - */ - OPERATOR_UNSPECIFIED(0), - /** - * - * - *
-       * Test if a field is equal to NaN.
-       * 
- * - * IS_NAN = 2; - */ - IS_NAN(2), - /** - * - * - *
-       * Test if an exprestion evaluates to Null.
-       * 
- * - * IS_NULL = 3; - */ - IS_NULL(3), - UNRECOGNIZED(-1), - ; + public java.util.List + getFieldsList() { + return fields_; + } + /** + * + * + *
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
+     * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public java.util.List< + ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + getFieldsOrBuilderList() { + return fields_; + } + /** + * + * + *
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
+     * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public int getFieldsCount() { + return fields_.size(); + } + /** + * + * + *
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
+     * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index) { + return fields_.get(index); + } + /** + * + * + *
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
+     * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( + int index) { + return fields_.get(index); + } - /** - * - * - *
-       * Unspecified. This value must not be used.
-       * 
- * - * OPERATOR_UNSPECIFIED = 0; - */ - public static final int OPERATOR_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * Test if a field is equal to NaN.
-       * 
- * - * IS_NAN = 2; - */ - public static final int IS_NAN_VALUE = 2; - /** - * - * - *
-       * Test if an exprestion evaluates to Null.
-       * 
- * - * IS_NULL = 3; - */ - public static final int IS_NULL_VALUE = 3; + private byte memoizedIsInitialized = -1; - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static Operator valueOf(int value) { - return forNumber(value); - } - - public static Operator forNumber(int value) { - switch (value) { - case 0: - return OPERATOR_UNSPECIFIED; - case 2: - return IS_NAN; - case 3: - return IS_NULL; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Operator findValueByNumber(int number) { - return Operator.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Operator[] VALUES = values(); - - public static Operator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Operator(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator) - } - - private int operandTypeCase_ = 0; - private java.lang.Object operandType_; - - public enum OperandTypeCase implements com.google.protobuf.Internal.EnumLite { - FIELD(2), - OPERANDTYPE_NOT_SET(0); - private final int value; - - private OperandTypeCase(int value) { - this.value = value; - } - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static OperandTypeCase valueOf(int value) { - return forNumber(value); - } - - public static OperandTypeCase forNumber(int value) { - switch (value) { - case 2: - return FIELD; - case 0: - return OPERANDTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public OperandTypeCase getOperandTypeCase() { - return OperandTypeCase.forNumber(operandTypeCase_); - } - - public static final int OP_FIELD_NUMBER = 1; - private int op_; - /** - * - * - *
-     * The unary operator to apply.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; - */ - public int getOpValue() { - return op_; - } - /** - * - * - *
-     * The unary operator to apply.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; - */ - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { - @SuppressWarnings("deprecation") - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); - return result == null - ? com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED - : result; - } - - public static final int FIELD_FIELD_NUMBER = 2; - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; - */ - public boolean hasField() { - return operandTypeCase_ == 2; - } - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); - } - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder - getFieldOrBuilder() { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.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; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; @@ -5829,14 +5642,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (op_ - != com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, op_); - } - if (operandTypeCase_ == 2) { - output.writeMessage( - 2, (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(2, fields_.get(i)); } unknownFields.writeTo(output); } @@ -5847,15 +5654,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (op_ - != com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, op_); - } - if (operandTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -5867,23 +5667,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.UnaryFilter)) { + if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.Projection)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other = - (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) obj; + com.google.firestore.v1beta1.StructuredQuery.Projection other = + (com.google.firestore.v1beta1.StructuredQuery.Projection) obj; boolean result = true; - result = result && op_ == other.op_; - result = result && getOperandTypeCase().equals(other.getOperandTypeCase()); - if (!result) return false; - switch (operandTypeCase_) { - case 2: - result = result && getField().equals(other.getField()); - break; - case 0: - default: - } + result = result && getFieldsList().equals(other.getFieldsList()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -5895,86 +5686,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OP_FIELD_NUMBER; - hash = (53 * hash) + op_; - switch (operandTypeCase_) { - case 2: - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - break; - case 0: - default: + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom(byte[] data) + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5992,7 +5777,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter prototype) { + com.google.firestore.v1beta1.StructuredQuery.Projection prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -6011,32 +5796,32 @@ protected Builder newBuilderForType( * * *
-     * A filter with a single operand.
+     * The projection of document's fields to return.
      * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.UnaryFilter) - com.google.firestore.v1beta1.StructuredQuery.UnaryFilterOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.Projection) + com.google.firestore.v1beta1.StructuredQuery.ProjectionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Projection.class, + com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.Projection.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6047,33 +5832,37 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - op_ = 0; - - operandTypeCase_ = 0; - operandType_ = null; + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldsBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { - return com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.getDefaultInstance(); + public com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter build() { - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter result = buildPartial(); + public com.google.firestore.v1beta1.StructuredQuery.Projection build() { + com.google.firestore.v1beta1.StructuredQuery.Projection result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -6081,18 +5870,19 @@ public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter build() { } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter buildPartial() { - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter result = - new com.google.firestore.v1beta1.StructuredQuery.UnaryFilter(this); - result.op_ = op_; - if (operandTypeCase_ == 2) { - if (fieldBuilder_ == null) { - result.operandType_ = operandType_; - } else { - result.operandType_ = fieldBuilder_.build(); + public com.google.firestore.v1beta1.StructuredQuery.Projection buildPartial() { + com.google.firestore.v1beta1.StructuredQuery.Projection result = + new com.google.firestore.v1beta1.StructuredQuery.Projection(this); + int from_bitField0_ = bitField0_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); } - result.operandTypeCase_ = operandTypeCase_; onBuilt(); return result; } @@ -6134,30 +5924,43 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) { - return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) other); + if (other instanceof com.google.firestore.v1beta1.StructuredQuery.Projection) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.Projection) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other) { - if (other == com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.Projection other) { + if (other == com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance()) return this; - if (other.op_ != 0) { - setOpValue(other.getOpValue()); - } - switch (other.getOperandTypeCase()) { - case FIELD: - { - mergeField(other.getField()); - break; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); } - case OPERANDTYPE_NOT_SET: - { - break; + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); } + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -6174,12 +5977,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parsedMessage = null; + com.google.firestore.v1beta1.StructuredQuery.Projection parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) e.getUnfinishedMessage(); + (com.google.firestore.v1beta1.StructuredQuery.Projection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -6189,235 +5992,264 @@ public Builder mergeFrom( return this; } - private int operandTypeCase_ = 0; - private java.lang.Object operandType_; + private int bitField0_; - public OperandTypeCase getOperandTypeCase() { - return OperandTypeCase.forNumber(operandTypeCase_); - } + private java.util.List fields_ = + java.util.Collections.emptyList(); - public Builder clearOperandType() { - operandTypeCase_ = 0; - operandType_ = null; - onChanged(); - return this; + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + fields_ = + new java.util.ArrayList( + fields_); + bitField0_ |= 0x00000001; + } } - private int op_ = 0; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1beta1.StructuredQuery.FieldReference, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + fieldsBuilder_; + /** * * *
-       * The unary operator to apply.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public int getOpValue() { - return op_; + public java.util.List + getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } } /** * * *
-       * The unary operator to apply.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder setOpValue(int value) { - op_ = value; - onChanged(); - return this; + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } } /** * * *
-       * The unary operator to apply.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { - @SuppressWarnings("deprecation") - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); - return result == null - ? com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED - : result; + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } } /** * * *
-       * The unary operator to apply.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder setOp( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator value) { - if (value == null) { - throw new NullPointerException(); + public Builder setFields( + int index, com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); } - - op_ = value.getNumber(); - onChanged(); return this; } /** * * *
-       * The unary operator to apply.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder clearOp() { - - op_ = 0; - onChanged(); + public Builder setFields( + int index, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } return this; } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1beta1.StructuredQuery.FieldReference, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - fieldBuilder_; /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public boolean hasField() { - return operandTypeCase_ == 2; - } - /** - * - * + public Builder addFields(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { - if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; + public Builder addFields( + int index, com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); } else { - if (operandTypeCase_ == 2) { - return fieldBuilder_.getMessage(); - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + fieldsBuilder_.addMessage(index, value); } + return this; } /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder setField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - operandType_ = value; + public Builder addFields( + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); onChanged(); } else { - fieldBuilder_.setMessage(value); + fieldsBuilder_.addMessage(builderForValue.build()); } - operandTypeCase_ = 2; return this; } /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder setField( + public Builder addFields( + int index, com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldBuilder_ == null) { - operandType_ = builderForValue.build(); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); onChanged(); } else { - fieldBuilder_.setMessage(builderForValue.build()); + fieldsBuilder_.addMessage(index, builderForValue.build()); } - operandTypeCase_ = 2; return this; } /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder mergeField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2 - && operandType_ - != com.google.firestore.v1beta1.StructuredQuery.FieldReference - .getDefaultInstance()) { - operandType_ = - com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder( - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_) - .mergeFrom(value) - .buildPartial(); - } else { - operandType_ = value; - } + public Builder addAllFields( + java.lang.Iterable + values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); onChanged(); } else { - if (operandTypeCase_ == 2) { - fieldBuilder_.mergeFrom(value); - } - fieldBuilder_.setMessage(value); + fieldsBuilder_.addAllMessages(values); } - operandTypeCase_ = 2; return this; } /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public Builder clearField() { - if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2) { - operandTypeCase_ = 0; - operandType_ = null; - onChanged(); - } + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); } else { - if (operandTypeCase_ == 2) { - operandTypeCase_ = 0; - operandType_ = null; - } - fieldBuilder_.clear(); + fieldsBuilder_.clear(); } return this; } @@ -6425,199 +6257,281 @@ public Builder clearField() { * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - return getFieldFieldBuilder().getBuilder(); + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; } /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldsBuilder( + int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder - getFieldOrBuilder() { - if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { - return fieldBuilder_.getMessageOrBuilder(); + getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); } else { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + return fieldsBuilder_.getMessageOrBuilder(index); } } /** * * *
-       * The field to which to apply the operator.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1beta1.StructuredQuery.FieldReference, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - if (!(operandTypeCase_ == 2)) { - operandType_ = - com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); - } - fieldBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1beta1.StructuredQuery.FieldReference, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder>( - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_, - getParentForChildren(), - isClean()); - operandType_ = null; + public java.util.List< + ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); } - operandTypeCase_ = 2; - onChanged(); - ; - return fieldBuilder_; - } - - @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); + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder + addFieldsBuilder() { + return getFieldsFieldBuilder() + .addBuilder( + com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance()); + } + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder addFieldsBuilder( + int index) { + return getFieldsFieldBuilder() + .addBuilder( + index, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance()); + } + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + */ + public java.util.List + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) - } - - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) - private static final com.google.firestore.v1beta1.StructuredQuery.UnaryFilter DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.UnaryFilter(); - } - - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstance() { + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1beta1.StructuredQuery.FieldReference, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1beta1.StructuredQuery.FieldReference, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder>( + fields_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + @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.v1beta1.StructuredQuery.Projection) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Projection) + private static final com.google.firestore.v1beta1.StructuredQuery.Projection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Projection(); + } + + public static com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public UnaryFilter parsePartialFrom( + public Projection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UnaryFilter(input, extensionRegistry); + return new Projection(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OrderOrBuilder + public interface UnaryFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.UnaryFilter) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The field to order by.
+     * The unary operator to apply.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; */ - boolean hasField(); + int getOpValue(); /** * * *
-     * The field to order by.
+     * The unary operator to apply.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; */ - com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp(); + /** * * *
-     * The field to order by.
+     * The field to which to apply the operator.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); - + boolean hasField(); /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * The field to which to apply the operator.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ - int getDirectionValue(); + com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * The field to which to apply the operator.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ - com.google.firestore.v1beta1.StructuredQuery.Direction getDirection(); + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.OperandTypeCase + getOperandTypeCase(); } /** * * *
-   * An order on a field.
+   * A filter with a single operand.
    * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} */ - public static final class Order extends com.google.protobuf.GeneratedMessageV3 + public static final class UnaryFilter extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.Order) - OrderOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + UnaryFilterOrBuilder { private static final long serialVersionUID = 0L; - // Use Order.newBuilder() to construct. - private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UnaryFilter.newBuilder() to construct. + private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Order() { - direction_ = 0; + private UnaryFilter() { + op_ = 0; } @java.lang.Override @@ -6625,7 +6539,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Order( + private UnaryFilter( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6644,29 +6558,32 @@ private Order( case 0: done = true; break; - case 10: + case 8: + { + int rawValue = input.readEnum(); + + op_ = rawValue; + break; + } + case 18: { com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); + if (operandTypeCase_ == 2) { + subBuilder = + ((com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_) + .toBuilder(); } - field_ = + operandType_ = input.readMessage( com.google.firestore.v1beta1.StructuredQuery.FieldReference.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); + subBuilder.mergeFrom( + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + operandType_ = subBuilder.buildPartial(); } - - break; - } - case 16: - { - int rawValue = input.readEnum(); - - direction_ = rawValue; + operandTypeCase_ = 2; break; } default: @@ -6690,241 +6607,440 @@ private Order( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Order.class, - com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.firestore.v1beta1.StructuredQuery.FieldReference field_; - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; - */ - public boolean hasField() { - return field_ != null; - } - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { - return field_ == null - ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; - } - /** - * - * - *
-     * The field to order by.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder - getFieldOrBuilder() { - return getField(); + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); } - public static final int DIRECTION_FIELD_NUMBER = 2; - private int direction_; - /** - * - * - *
-     * The direction to order by. Defaults to `ASCENDING`.
-     * 
- * - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; - */ - public int getDirectionValue() { - return direction_; - } /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * A unary operator.
      * 
* - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + * Protobuf enum {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator} */ - public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { - @SuppressWarnings("deprecation") - com.google.firestore.v1beta1.StructuredQuery.Direction result = - com.google.firestore.v1beta1.StructuredQuery.Direction.valueOf(direction_); - return result == null - ? com.google.firestore.v1beta1.StructuredQuery.Direction.UNRECOGNIZED - : result; - } + public enum Operator implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified. This value must not be used.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + OPERATOR_UNSPECIFIED(0), + /** + * + * + *
+       * Test if a field is equal to NaN.
+       * 
+ * + * IS_NAN = 2; + */ + IS_NAN(2), + /** + * + * + *
+       * Test if an exprestion evaluates to Null.
+       * 
+ * + * IS_NULL = 3; + */ + IS_NULL(3), + UNRECOGNIZED(-1), + ; - private byte memoizedIsInitialized = -1; + /** + * + * + *
+       * Unspecified. This value must not be used.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Test if a field is equal to NaN.
+       * 
+ * + * IS_NAN = 2; + */ + public static final int IS_NAN_VALUE = 2; + /** + * + * + *
+       * Test if an exprestion evaluates to Null.
+       * 
+ * + * IS_NULL = 3; + */ + public static final int IS_NULL_VALUE = 3; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - memoizedIsInitialized = 1; - return true; - } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Operator valueOf(int value) { + return forNumber(value); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); + public static Operator forNumber(int value) { + switch (value) { + case 0: + return OPERATOR_UNSPECIFIED; + case 2: + return IS_NAN; + case 3: + return IS_NULL; + default: + return null; + } } - if (direction_ - != com.google.firestore.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, direction_); + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; } - unknownFields.writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Operator findValueByNumber(int number) { + return Operator.forNumber(number); + } + }; - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); - } - if (direction_ - != com.google.firestore.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.Order)) { - return super.equals(obj); + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - com.google.firestore.v1beta1.StructuredQuery.Order other = - (com.google.firestore.v1beta1.StructuredQuery.Order) obj; - boolean result = true; - result = result && (hasField() == other.hasField()); - if (hasField()) { - result = result && getField().equals(other.getField()); + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.getDescriptor() + .getEnumTypes() + .get(0); } - result = result && direction_ == other.direction_; - 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 (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); + private static final Operator[] VALUES = values(); + + public static Operator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; } - hash = (37 * hash) + DIRECTION_FIELD_NUMBER; - hash = (53 * hash) + direction_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private final int value; - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private Operator(int value) { + this.value = value; + } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + // @@protoc_insertion_point(enum_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator) } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private int operandTypeCase_ = 0; + private java.lang.Object operandType_; - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public enum OperandTypeCase implements com.google.protobuf.Internal.EnumLite { + FIELD(2), + OPERANDTYPE_NOT_SET(0); + private final int value; - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private OperandTypeCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static OperandTypeCase valueOf(int value) { + return forNumber(value); + } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static OperandTypeCase forNumber(int value) { + switch (value) { + case 2: + return FIELD; + case 0: + return OPERANDTYPE_NOT_SET; + default: + return null; + } + } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + public int getNumber() { + return this.value; + } + }; + + public OperandTypeCase getOperandTypeCase() { + return OperandTypeCase.forNumber(operandTypeCase_); } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseDelimitedFrom( + public static final int OP_FIELD_NUMBER = 1; + private int op_; + /** + * + * + *
+     * The unary operator to apply.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public int getOpValue() { + return op_; + } + /** + * + * + *
+     * The unary operator to apply.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { + @SuppressWarnings("deprecation") + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); + return result == null + ? com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED + : result; + } + + public static final int FIELD_FIELD_NUMBER = 2; + /** + * + * + *
+     * The field to which to apply the operator.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + */ + public boolean hasField() { + return operandTypeCase_ == 2; + } + /** + * + * + *
+     * The field to which to apply the operator.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + } + /** + * + * + *
+     * The field to which to apply the operator.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder + getFieldOrBuilder() { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.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 (op_ + != com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, op_); + } + if (operandTypeCase_ == 2) { + output.writeMessage( + 2, (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (op_ + != com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, op_); + } + if (operandTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.UnaryFilter)) { + return super.equals(obj); + } + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other = + (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) obj; + + boolean result = true; + result = result && op_ == other.op_; + result = result && getOperandTypeCase().equals(other.getOperandTypeCase()); + if (!result) return false; + switch (operandTypeCase_) { + case 2: + result = result && getField().equals(other.getField()); + 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) + OP_FIELD_NUMBER; + hash = (53 * hash) + op_; + switch (operandTypeCase_) { + case 2: + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6941,7 +7057,8 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.firestore.v1beta1.StructuredQuery.Order prototype) { + public static Builder newBuilder( + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -6960,32 +7077,32 @@ protected Builder newBuilderForType( * * *
-     * An order on a field.
+     * A filter with a single operand.
      * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.Order) - com.google.firestore.v1beta1.StructuredQuery.OrderOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + com.google.firestore.v1beta1.StructuredQuery.UnaryFilterOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Order.class, - com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.Order.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7002,31 +7119,27 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - direction_ = 0; + op_ = 0; - return this; + operandTypeCase_ = 0; + operandType_ = null; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstanceForType() { - return com.google.firestore.v1beta1.StructuredQuery.Order.getDefaultInstance(); + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Order build() { - com.google.firestore.v1beta1.StructuredQuery.Order result = buildPartial(); + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter build() { + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7034,15 +7147,18 @@ public com.google.firestore.v1beta1.StructuredQuery.Order build() { } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Order buildPartial() { - com.google.firestore.v1beta1.StructuredQuery.Order result = - new com.google.firestore.v1beta1.StructuredQuery.Order(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter buildPartial() { + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter result = + new com.google.firestore.v1beta1.StructuredQuery.UnaryFilter(this); + result.op_ = op_; + if (operandTypeCase_ == 2) { + if (fieldBuilder_ == null) { + result.operandType_ = operandType_; + } else { + result.operandType_ = fieldBuilder_.build(); + } } - result.direction_ = direction_; + result.operandTypeCase_ = operandTypeCase_; onBuilt(); return result; } @@ -7084,22 +7200,30 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1beta1.StructuredQuery.Order) { - return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.Order) other); + if (other instanceof com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.Order other) { - if (other == com.google.firestore.v1beta1.StructuredQuery.Order.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other) { + if (other == com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); + if (other.op_ != 0) { + setOpValue(other.getOpValue()); } - if (other.direction_ != 0) { - setDirectionValue(other.getDirectionValue()); + switch (other.getOperandTypeCase()) { + case FIELD: + { + mergeField(other.getField()); + break; + } + case OPERANDTYPE_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7116,12 +7240,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1beta1.StructuredQuery.Order parsedMessage = null; + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.firestore.v1beta1.StructuredQuery.Order) e.getUnfinishedMessage(); + (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7131,7 +7255,99 @@ public Builder mergeFrom( return this; } - private com.google.firestore.v1beta1.StructuredQuery.FieldReference field_ = null; + private int operandTypeCase_ = 0; + private java.lang.Object operandType_; + + public OperandTypeCase getOperandTypeCase() { + return OperandTypeCase.forNumber(operandTypeCase_); + } + + public Builder clearOperandType() { + operandTypeCase_ = 0; + operandType_ = null; + onChanged(); + return this; + } + + private int op_ = 0; + /** + * + * + *
+       * The unary operator to apply.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public int getOpValue() { + return op_; + } + /** + * + * + *
+       * The unary operator to apply.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public Builder setOpValue(int value) { + op_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The unary operator to apply.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { + @SuppressWarnings("deprecation") + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); + return result == null + ? com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The unary operator to apply.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public Builder setOp( + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + + op_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The unary operator to apply.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + public Builder clearOp() { + + op_ = 0; + onChanged(); + return this; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.v1beta1.StructuredQuery.FieldReference, com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, @@ -7141,161 +7357,176 @@ public Builder mergeFrom( * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public boolean hasField() { - return fieldBuilder_ != null || field_ != null; + return operandTypeCase_ == 2; } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { if (fieldBuilder_ == null) { - return field_ == null - ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); } else { - return fieldBuilder_.getMessage(); + if (operandTypeCase_ == 2) { + return fieldBuilder_.getMessage(); + } + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); } } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public Builder setField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { if (fieldBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - field_ = value; + operandType_ = value; onChanged(); } else { fieldBuilder_.setMessage(value); } - + operandTypeCase_ = 2; return this; } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public Builder setField( com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { if (fieldBuilder_ == null) { - field_ = builderForValue.build(); + operandType_ = builderForValue.build(); onChanged(); } else { fieldBuilder_.setMessage(builderForValue.build()); } - + operandTypeCase_ = 2; return this; } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public Builder mergeField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder(field_) + if (operandTypeCase_ == 2 + && operandType_ + != com.google.firestore.v1beta1.StructuredQuery.FieldReference + .getDefaultInstance()) { + operandType_ = + com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder( + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_) .mergeFrom(value) .buildPartial(); } else { - field_ = value; + operandType_ = value; } onChanged(); } else { - fieldBuilder_.mergeFrom(value); + if (operandTypeCase_ == 2) { + fieldBuilder_.mergeFrom(value); + } + fieldBuilder_.setMessage(value); } - + operandTypeCase_ = 2; return this; } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public Builder clearField() { if (fieldBuilder_ == null) { - field_ = null; - onChanged(); + if (operandTypeCase_ == 2) { + operandTypeCase_ = 0; + operandType_ = null; + onChanged(); + } } else { - field_ = null; - fieldBuilder_ = null; + if (operandTypeCase_ == 2) { + operandTypeCase_ = 0; + operandType_ = null; + } + fieldBuilder_.clear(); } - return this; } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - - onChanged(); return getFieldFieldBuilder().getBuilder(); } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { + if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { return fieldBuilder_.getMessageOrBuilder(); } else { - return field_ == null - ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); } } /** * * *
-       * The field to order by.
+       * The field to which to apply the operator.
        * 
* - * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.v1beta1.StructuredQuery.FieldReference, @@ -7303,93 +7534,24 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFi com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> getFieldFieldBuilder() { if (fieldBuilder_ == null) { + if (!(operandTypeCase_ == 2)) { + operandType_ = + com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + } fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.v1beta1.StructuredQuery.FieldReference, com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder>( - getField(), getParentForChildren(), isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private int direction_ = 0; - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; - */ - public int getDirectionValue() { - return direction_; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; - */ - public Builder setDirectionValue(int value) { - direction_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { - @SuppressWarnings("deprecation") - com.google.firestore.v1beta1.StructuredQuery.Direction result = - com.google.firestore.v1beta1.StructuredQuery.Direction.valueOf(direction_); - return result == null - ? com.google.firestore.v1beta1.StructuredQuery.Direction.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; - */ - public Builder setDirection(com.google.firestore.v1beta1.StructuredQuery.Direction value) { - if (value == null) { - throw new NullPointerException(); + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_, + getParentForChildren(), + isClean()); + operandType_ = null; } - - direction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The direction to order by. Defaults to `ASCENDING`.
-       * 
- * - * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; - */ - public Builder clearDirection() { - - direction_ = 0; + operandTypeCase_ = 2; onChanged(); - return this; + ; + return fieldBuilder_; } @java.lang.Override @@ -7404,77 +7566,124 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) } - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Order) - private static final com.google.firestore.v1beta1.StructuredQuery.Order DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + private static final com.google.firestore.v1beta1.StructuredQuery.UnaryFilter DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Order(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.UnaryFilter(); } - public static com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstance() { + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Order parsePartialFrom( + public UnaryFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Order(input, extensionRegistry); + return new UnaryFilter(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FieldReferenceOrBuilder + public interface OrderOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Order) com.google.protobuf.MessageOrBuilder { - /** string field_path = 2; */ - java.lang.String getFieldPath(); - /** string field_path = 2; */ - com.google.protobuf.ByteString getFieldPathBytes(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + boolean hasField(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + int getDirectionValue(); + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + com.google.firestore.v1beta1.StructuredQuery.Direction getDirection(); } /** * * *
-   * A reference to a field, such as `max(messages.time) as max_time`.
+   * An order on a field.
    * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Order} */ - public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 + public static final class Order extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.FieldReference) - FieldReferenceOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.Order) + OrderOrBuilder { private static final long serialVersionUID = 0L; - // Use FieldReference.newBuilder() to construct. - private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Order.newBuilder() to construct. + private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private FieldReference() { - fieldPath_ = ""; + private Order() { + direction_ = 0; } @java.lang.Override @@ -7482,7 +7691,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FieldReference( + private Order( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7501,11 +7710,29 @@ private FieldReference( case 0: done = true; break; - case 18: + case 10: { - java.lang.String s = input.readStringRequireUtf8(); + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder subBuilder = + null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = + input.readMessage( + com.google.firestore.v1beta1.StructuredQuery.FieldReference.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } - fieldPath_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + direction_ = rawValue; break; } default: @@ -7529,44 +7756,91 @@ private FieldReference( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Order.class, + com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); } - public static final int FIELD_PATH_FIELD_NUMBER = 2; - private volatile java.lang.Object fieldPath_; - /** string field_path = 2; */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - 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(); - fieldPath_ = s; - return s; - } + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.firestore.v1beta1.StructuredQuery.FieldReference field_; + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public boolean hasField() { + return field_ != null; } - /** string field_path = 2; */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { + return field_ == null + ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; + } + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder + getFieldOrBuilder() { + return getField(); + } + + public static final int DIRECTION_FIELD_NUMBER = 2; + private int direction_; + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public int getDirectionValue() { + return direction_; + } + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { + @SuppressWarnings("deprecation") + com.google.firestore.v1beta1.StructuredQuery.Direction result = + com.google.firestore.v1beta1.StructuredQuery.Direction.valueOf(direction_); + return result == null + ? com.google.firestore.v1beta1.StructuredQuery.Direction.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; @@ -7583,8 +7857,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getFieldPathBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (direction_ + != com.google.firestore.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, direction_); } unknownFields.writeTo(output); } @@ -7595,8 +7874,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getFieldPathBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); + } + if (direction_ + != com.google.firestore.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -7608,14 +7892,18 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.FieldReference)) { + if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.Order)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.FieldReference other = - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) obj; + com.google.firestore.v1beta1.StructuredQuery.Order other = + (com.google.firestore.v1beta1.StructuredQuery.Order) obj; boolean result = true; - result = result && getFieldPath().equals(other.getFieldPath()); + result = result && (hasField() == other.hasField()); + if (hasField()) { + result = result && getField().equals(other.getField()); + } + result = result && direction_ == other.direction_; result = result && unknownFields.equals(other.unknownFields); return result; } @@ -7627,78 +7915,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFieldPath().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + direction_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom(byte[] data) + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7715,8 +8007,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.firestore.v1beta1.StructuredQuery.FieldReference prototype) { + public static Builder newBuilder(com.google.firestore.v1beta1.StructuredQuery.Order prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7735,32 +8026,32 @@ protected Builder newBuilderForType( * * *
-     * A reference to a field, such as `max(messages.time) as max_time`.
+     * An order on a field.
      * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Order} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.FieldReference) - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.Order) + com.google.firestore.v1beta1.StructuredQuery.OrderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Order.class, + com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.Order.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7777,7 +8068,13 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - fieldPath_ = ""; + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + direction_ = 0; return this; } @@ -7785,18 +8082,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.FieldReference - getDefaultInstanceForType() { - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + public com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.Order.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.FieldReference build() { - com.google.firestore.v1beta1.StructuredQuery.FieldReference result = buildPartial(); + public com.google.firestore.v1beta1.StructuredQuery.Order build() { + com.google.firestore.v1beta1.StructuredQuery.Order result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7804,10 +8100,15 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference build() { } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.FieldReference buildPartial() { - com.google.firestore.v1beta1.StructuredQuery.FieldReference result = - new com.google.firestore.v1beta1.StructuredQuery.FieldReference(this); - result.fieldPath_ = fieldPath_; + public com.google.firestore.v1beta1.StructuredQuery.Order buildPartial() { + com.google.firestore.v1beta1.StructuredQuery.Order result = + new com.google.firestore.v1beta1.StructuredQuery.Order(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.direction_ = direction_; onBuilt(); return result; } @@ -7849,21 +8150,22 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1beta1.StructuredQuery.FieldReference) { - return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.FieldReference) other); + if (other instanceof com.google.firestore.v1beta1.StructuredQuery.Order) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.Order) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.FieldReference other) { - if (other - == com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.Order other) { + if (other == com.google.firestore.v1beta1.StructuredQuery.Order.getDefaultInstance()) return this; - if (!other.getFieldPath().isEmpty()) { - fieldPath_ = other.fieldPath_; - onChanged(); + if (other.hasField()) { + mergeField(other.getField()); + } + if (other.direction_ != 0) { + setDirectionValue(other.getDirectionValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7880,13 +8182,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1beta1.StructuredQuery.FieldReference parsedMessage = null; + com.google.firestore.v1beta1.StructuredQuery.Order parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) - e.getUnfinishedMessage(); + (com.google.firestore.v1beta1.StructuredQuery.Order) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7896,56 +8197,263 @@ public Builder mergeFrom( return this; } - private java.lang.Object fieldPath_ = ""; - /** string field_path = 2; */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } + private com.google.firestore.v1beta1.StructuredQuery.FieldReference field_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1beta1.StructuredQuery.FieldReference, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + fieldBuilder_; + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; } - /** string field_path = 2; */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { + if (fieldBuilder_ == null) { + return field_ == null + ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; } else { - return (com.google.protobuf.ByteString) ref; + return fieldBuilder_.getMessage(); } } - /** string field_path = 2; */ - public Builder setFieldPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public Builder setField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); } - fieldPath_ = value; - onChanged(); return this; } - /** string field_path = 2; */ - public Builder clearFieldPath() { + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public Builder setField( + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } - fieldPath_ = getDefaultInstance().getFieldPath(); + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public Builder mergeField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder(field_) + .mergeFrom(value) + .buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder + getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null + ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; + } + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1beta1.StructuredQuery.FieldReference, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1beta1.StructuredQuery.FieldReference, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder>( + getField(), getParentForChildren(), isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private int direction_ = 0; + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public int getDirectionValue() { + return direction_; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public Builder setDirectionValue(int value) { + direction_ = value; onChanged(); return this; } - /** string field_path = 2; */ - public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { + @SuppressWarnings("deprecation") + com.google.firestore.v1beta1.StructuredQuery.Direction result = + com.google.firestore.v1beta1.StructuredQuery.Direction.valueOf(direction_); + return result == null + ? com.google.firestore.v1beta1.StructuredQuery.Direction.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public Builder setDirection(com.google.firestore.v1beta1.StructuredQuery.Direction value) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fieldPath_ = value; + direction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + */ + public Builder clearDirection() { + + direction_ = 0; onChanged(); return this; } @@ -7962,136 +8470,77 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.Order) } - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.FieldReference) - private static final com.google.firestore.v1beta1.StructuredQuery.FieldReference - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Order) + private static final com.google.firestore.v1beta1.StructuredQuery.Order DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.FieldReference(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Order(); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstance() { + public static com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public FieldReference parsePartialFrom( + public Order parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldReference(input, extensionRegistry); + return new Order(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface ProjectionOrBuilder + public interface FieldReferenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.FieldReference) com.google.protobuf.MessageOrBuilder { - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - java.util.List getFieldsList(); - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index); - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - int getFieldsCount(); - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - java.util.List - getFieldsOrBuilderList(); - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( - int index); + /** string field_path = 2; */ + java.lang.String getFieldPath(); + /** string field_path = 2; */ + com.google.protobuf.ByteString getFieldPathBytes(); } /** * * *
-   * The projection of document's fields to return.
+   * A reference to a field, such as `max(messages.time) as max_time`.
    * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} */ - public static final class Projection extends com.google.protobuf.GeneratedMessageV3 + public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.Projection) - ProjectionOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.FieldReference) + FieldReferenceOrBuilder { private static final long serialVersionUID = 0L; - // Use Projection.newBuilder() to construct. - private Projection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use FieldReference.newBuilder() to construct. + private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Projection() { - fields_ = java.util.Collections.emptyList(); + private FieldReference() { + fieldPath_ = ""; } @java.lang.Override @@ -8099,7 +8548,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Projection( + private FieldReference( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8120,16 +8569,9 @@ private Projection( break; case 18: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - fields_ = - new java.util.ArrayList< - com.google.firestore.v1beta1.StructuredQuery.FieldReference>(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.parser(), - extensionRegistry)); + java.lang.String s = input.readStringRequireUtf8(); + + fieldPath_ = s; break; } default: @@ -8146,9 +8588,6 @@ private Projection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -8156,94 +8595,44 @@ private Projection( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Projection.class, - com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); } - public static final int FIELDS_FIELD_NUMBER = 2; - private java.util.List fields_; - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List - getFieldsList() { - return fields_; - } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List< - ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsOrBuilderList() { - return fields_; - } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public int getFieldsCount() { - return fields_.size(); - } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index) { - return fields_.get(index); + public static final int FIELD_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object fieldPath_; + /** string field_path = 2; */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + 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(); + fieldPath_ = s; + return s; + } } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( - int index) { - return fields_.get(index); + /** string field_path = 2; */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -8260,8 +8649,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(2, fields_.get(i)); + if (!getFieldPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); } unknownFields.writeTo(output); } @@ -8272,8 +8661,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); + if (!getFieldPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -8285,14 +8674,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.Projection)) { + if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.FieldReference)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.Projection other = - (com.google.firestore.v1beta1.StructuredQuery.Projection) obj; + com.google.firestore.v1beta1.StructuredQuery.FieldReference other = + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) obj; boolean result = true; - result = result && getFieldsList().equals(other.getFieldsList()); + result = result && getFieldPath().equals(other.getFieldPath()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -8304,80 +8693,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom(byte[] data) + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseDelimitedFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8395,7 +8782,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.firestore.v1beta1.StructuredQuery.Projection prototype) { + com.google.firestore.v1beta1.StructuredQuery.FieldReference prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8414,32 +8801,32 @@ protected Builder newBuilderForType( * * *
-     * The projection of document's fields to return.
+     * A reference to a field, such as `max(messages.time) as max_time`.
      * 
* - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.Projection) - com.google.firestore.v1beta1.StructuredQuery.ProjectionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1beta1.StructuredQuery.FieldReference) + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Projection.class, - com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.Projection.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8450,37 +8837,32 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldsBuilder_.clear(); - } + fieldPath_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1beta1.QueryProto - .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstanceForType() { - return com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance(); + public com.google.firestore.v1beta1.StructuredQuery.FieldReference + getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Projection build() { - com.google.firestore.v1beta1.StructuredQuery.Projection result = buildPartial(); + public com.google.firestore.v1beta1.StructuredQuery.FieldReference build() { + com.google.firestore.v1beta1.StructuredQuery.FieldReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8488,19 +8870,10 @@ public com.google.firestore.v1beta1.StructuredQuery.Projection build() { } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Projection buildPartial() { - com.google.firestore.v1beta1.StructuredQuery.Projection result = - new com.google.firestore.v1beta1.StructuredQuery.Projection(this); - int from_bitField0_ = bitField0_; - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } + public com.google.firestore.v1beta1.StructuredQuery.FieldReference buildPartial() { + com.google.firestore.v1beta1.StructuredQuery.FieldReference result = + new com.google.firestore.v1beta1.StructuredQuery.FieldReference(this); + result.fieldPath_ = fieldPath_; onBuilt(); return result; } @@ -8542,479 +8915,105 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1beta1.StructuredQuery.Projection) { - return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.Projection) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.Projection other) { - if (other == com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance()) - return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFieldsFieldBuilder() - : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.firestore.v1beta1.StructuredQuery.Projection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.firestore.v1beta1.StructuredQuery.Projection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List fields_ = - java.util.Collections.emptyList(); - - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - fields_ = - new java.util.ArrayList( - fields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.firestore.v1beta1.StructuredQuery.FieldReference, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - fieldsBuilder_; - - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List - getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder setFields( - int index, com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder setFields( - int index, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder addFields(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - } else { - fieldsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder addFields( - int index, com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder addFields( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder addFields( - int index, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder addAllFields( - java.lang.Iterable - values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); - onChanged(); + if (other instanceof com.google.firestore.v1beta1.StructuredQuery.FieldReference) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.FieldReference) other); } else { - fieldsBuilder_.addAllMessages(values); + super.mergeFrom(other); + return this; } - return this; } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + + public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.FieldReference other) { + if (other + == com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance()) + return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; onChanged(); - } else { - fieldsBuilder_.clear(); } + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1beta1.StructuredQuery.FieldReference parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } } return this; } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldsBuilder( - int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder - getFieldsOrBuilder(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); + + private java.lang.Object fieldPath_ = ""; + /** string field_path = 2; */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; } else { - return fieldsBuilder_.getMessageOrBuilder(index); + return (java.lang.String) ref; } } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List< - ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); + /** string field_path = 2; */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; } else { - return java.util.Collections.unmodifiableList(fields_); + return (com.google.protobuf.ByteString) ref; } } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder - addFieldsBuilder() { - return getFieldsFieldBuilder() - .addBuilder( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance()); - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder addFieldsBuilder( - int index) { - return getFieldsFieldBuilder() - .addBuilder( - index, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance()); - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); + /** string field_path = 2; */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fieldPath_ = value; + onChanged(); + return this; } + /** string field_path = 2; */ + public Builder clearFieldPath() { - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.firestore.v1beta1.StructuredQuery.FieldReference, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.firestore.v1beta1.StructuredQuery.FieldReference, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder>( - fields_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - fields_ = null; + fieldPath_ = getDefaultInstance().getFieldPath(); + onChanged(); + return this; + } + /** string field_path = 2; */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return fieldsBuilder_; + checkByteStringIsUtf8(value); + + fieldPath_ = value; + onChanged(); + return this; } @java.lang.Override @@ -9029,42 +9028,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.FieldReference) } - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Projection) - private static final com.google.firestore.v1beta1.StructuredQuery.Projection DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.FieldReference) + private static final com.google.firestore.v1beta1.StructuredQuery.FieldReference + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Projection(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.FieldReference(); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstance() { + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Projection parsePartialFrom( + public FieldReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Projection(input, extensionRegistry); + return new FieldReference(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java index b55832125cbe..8acdc9b5d372 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java @@ -2170,9 +2170,7 @@ public com.google.firestore.v1beta1.Target.DocumentsTargetOrBuilder getDocuments * * *
-   * A resume token from a prior
-   * [TargetChange][google.firestore.v1beta1.TargetChange] for an identical
-   * target.
+   * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
    * Using a resume token with a different target is unsupported and may fail.
    * 
* @@ -3175,9 +3173,7 @@ public com.google.firestore.v1beta1.Target.DocumentsTargetOrBuilder getDocuments * * *
-     * A resume token from a prior
-     * [TargetChange][google.firestore.v1beta1.TargetChange] for an identical
-     * target.
+     * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
      * Using a resume token with a different target is unsupported and may fail.
      * 
* @@ -3193,9 +3189,7 @@ public com.google.protobuf.ByteString getResumeToken() { * * *
-     * A resume token from a prior
-     * [TargetChange][google.firestore.v1beta1.TargetChange] for an identical
-     * target.
+     * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
      * Using a resume token with a different target is unsupported and may fail.
      * 
* @@ -3214,9 +3208,7 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { * * *
-     * A resume token from a prior
-     * [TargetChange][google.firestore.v1beta1.TargetChange] for an identical
-     * target.
+     * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
      * Using a resume token with a different target is unsupported and may fail.
      * 
* diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetOrBuilder.java index 2832f4e6112b..a7b5a1dd63bf 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetOrBuilder.java @@ -74,9 +74,7 @@ public interface TargetOrBuilder * * *
-   * A resume token from a prior
-   * [TargetChange][google.firestore.v1beta1.TargetChange] for an identical
-   * target.
+   * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
    * Using a resume token with a different target is unsupported and may fail.
    * 
* diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java index 26f1cd1cebdb..1080e8c2e680 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java @@ -7,8 +7,7 @@ * * *
- * The request for
- * [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
+ * The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
  * 
* * Protobuf type {@code google.firestore.v1beta1.UpdateDocumentRequest} @@ -547,8 +546,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The request for
-   * [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
+   * The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
    * 
* * Protobuf type {@code google.firestore.v1beta1.UpdateDocumentRequest} diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java index 229eb10684d7..bf65f5cb7b98 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java @@ -300,7 +300,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { * * *
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -315,7 +315,7 @@ public boolean hasTransform() {
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -333,7 +333,7 @@ public com.google.firestore.v1beta1.DocumentTransform getTransform() {
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -1241,7 +1241,7 @@ public Builder setDeleteBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1256,7 +1256,7 @@ public boolean hasTransform() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1281,7 +1281,7 @@ public com.google.firestore.v1beta1.DocumentTransform getTransform() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1306,7 +1306,7 @@ public Builder setTransform(com.google.firestore.v1beta1.DocumentTransform value
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1329,7 +1329,7 @@ public Builder setTransform(
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1363,7 +1363,7 @@ public Builder mergeTransform(com.google.firestore.v1beta1.DocumentTransform val
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1391,7 +1391,7 @@ public Builder clearTransform() {
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1406,7 +1406,7 @@ public com.google.firestore.v1beta1.DocumentTransform.Builder getTransformBuilde
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
@@ -1428,7 +1428,7 @@ public com.google.firestore.v1beta1.DocumentTransformOrBuilder getTransformOrBui
      *
      *
      * 
-     * Applies a tranformation to a document.
+     * Applies a transformation to a document.
      * At most one `transform` per document is allowed in a given request.
      * An `update` cannot follow a `transform` on the same document in a given
      * request.
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteOrBuilder.java
index 1ad5fe37a116..829ef48444aa 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteOrBuilder.java
@@ -66,7 +66,7 @@ public interface WriteOrBuilder
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -79,7 +79,7 @@ public interface WriteOrBuilder
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
@@ -92,7 +92,7 @@ public interface WriteOrBuilder
    *
    *
    * 
-   * Applies a tranformation to a document.
+   * Applies a transformation to a document.
    * At most one `transform` per document is allowed in a given request.
    * An `update` cannot follow a `transform` on the same document in a given
    * request.
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteProto.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteProto.java
index 3cbc5d2b0cea..ee0ee363b822 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteProto.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteProto.java
@@ -54,11 +54,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
   static {
     java.lang.String[] descriptorData = {
       "\n$google/firestore/v1beta1/write.proto\022\030"
-          + "google.firestore.v1beta1\032\034google/api/ann"
-          + "otations.proto\032%google/firestore/v1beta1"
-          + "/common.proto\032\'google/firestore/v1beta1/"
-          + "document.proto\032\037google/protobuf/timestam"
-          + "p.proto\"\235\002\n\005Write\0224\n\006update\030\001 \001(\0132\".goog"
+          + "google.firestore.v1beta1\032%google/firesto"
+          + "re/v1beta1/common.proto\032\'google/firestor"
+          + "e/v1beta1/document.proto\032\037google/protobu"
+          + "f/timestamp.proto\032\034google/api/annotation"
+          + "s.proto\"\235\002\n\005Write\0224\n\006update\030\001 \001(\0132\".goog"
           + "le.firestore.v1beta1.DocumentH\000\022\020\n\006delet"
           + "e\030\002 \001(\tH\000\022@\n\ttransform\030\006 \001(\0132+.google.fi"
           + "restore.v1beta1.DocumentTransformH\000\022;\n\013u"
@@ -112,10 +112,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
     com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
         descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
-          com.google.api.AnnotationsProto.getDescriptor(),
           com.google.firestore.v1beta1.CommonProto.getDescriptor(),
           com.google.firestore.v1beta1.DocumentProto.getDescriptor(),
           com.google.protobuf.TimestampProto.getDescriptor(),
+          com.google.api.AnnotationsProto.getDescriptor(),
         },
         assigner);
     internal_static_google_firestore_v1beta1_Write_descriptor =
@@ -191,10 +191,10 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
             new java.lang.String[] {
               "TargetId", "Count",
             });
-    com.google.api.AnnotationsProto.getDescriptor();
     com.google.firestore.v1beta1.CommonProto.getDescriptor();
     com.google.firestore.v1beta1.DocumentProto.getDescriptor();
     com.google.protobuf.TimestampProto.getDescriptor();
+    com.google.api.AnnotationsProto.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java
index d7b3c78613b1..556fafaed98d 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java
@@ -337,9 +337,9 @@ public com.google.firestore.v1beta1.WriteOrBuilder getWritesOrBuilder(int index)
    * 
    * A stream token that was previously sent by the server.
    * The client should set this field to the token from the most recent
-   * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received.
-   * This acknowledges that the client has received responses up to this token.
-   * After sending this token, earlier tokens may not be used anymore.
+   * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+   * received responses up to this token. After sending this token, earlier
+   * tokens may not be used anymore.
    * The server may close the stream if there are too many unacknowledged
    * responses.
    * Leave this field unset when creating a new stream. To resume a stream at
@@ -1539,9 +1539,9 @@ public java.util.List getWritesBuild
      * 
      * A stream token that was previously sent by the server.
      * The client should set this field to the token from the most recent
-     * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received.
-     * This acknowledges that the client has received responses up to this token.
-     * After sending this token, earlier tokens may not be used anymore.
+     * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+     * received responses up to this token. After sending this token, earlier
+     * tokens may not be used anymore.
      * The server may close the stream if there are too many unacknowledged
      * responses.
      * Leave this field unset when creating a new stream. To resume a stream at
@@ -1560,9 +1560,9 @@ public com.google.protobuf.ByteString getStreamToken() {
      * 
      * A stream token that was previously sent by the server.
      * The client should set this field to the token from the most recent
-     * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received.
-     * This acknowledges that the client has received responses up to this token.
-     * After sending this token, earlier tokens may not be used anymore.
+     * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+     * received responses up to this token. After sending this token, earlier
+     * tokens may not be used anymore.
      * The server may close the stream if there are too many unacknowledged
      * responses.
      * Leave this field unset when creating a new stream. To resume a stream at
@@ -1587,9 +1587,9 @@ public Builder setStreamToken(com.google.protobuf.ByteString value) {
      * 
      * A stream token that was previously sent by the server.
      * The client should set this field to the token from the most recent
-     * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received.
-     * This acknowledges that the client has received responses up to this token.
-     * After sending this token, earlier tokens may not be used anymore.
+     * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+     * received responses up to this token. After sending this token, earlier
+     * tokens may not be used anymore.
      * The server may close the stream if there are too many unacknowledged
      * responses.
      * Leave this field unset when creating a new stream. To resume a stream at
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequestOrBuilder.java
index 0d3b0e8efef0..4bc48666300b 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequestOrBuilder.java
@@ -135,9 +135,9 @@ public interface WriteRequestOrBuilder
    * 
    * A stream token that was previously sent by the server.
    * The client should set this field to the token from the most recent
-   * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received.
-   * This acknowledges that the client has received responses up to this token.
-   * After sending this token, earlier tokens may not be used anymore.
+   * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+   * received responses up to this token. After sending this token, earlier
+   * tokens may not be used anymore.
    * The server may close the stream if there are too many unacknowledged
    * responses.
    * Leave this field unset when creating a new stream. To resume a stream at
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java
index e4fff28a13e6..5d728f0b4555 100644
--- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java
+++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java
@@ -168,9 +168,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    *
    *
    * 
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -182,9 +181,8 @@ public java.util.List getTransformResultsLis * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -197,9 +195,8 @@ public java.util.List getTransformResultsLis * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -211,9 +208,8 @@ public int getTransformResultsCount() { * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -225,9 +221,8 @@ public com.google.firestore.v1beta1.Value getTransformResults(int index) { * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -851,9 +846,8 @@ private void ensureTransformResultsIsMutable() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -869,9 +863,8 @@ public java.util.List getTransformResultsLis * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -887,9 +880,8 @@ public int getTransformResultsCount() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -905,9 +897,8 @@ public com.google.firestore.v1beta1.Value getTransformResults(int index) { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -929,9 +920,8 @@ public Builder setTransformResults(int index, com.google.firestore.v1beta1.Value * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -951,9 +941,8 @@ public Builder setTransformResults( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -975,9 +964,8 @@ public Builder addTransformResults(com.google.firestore.v1beta1.Value value) { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -999,9 +987,8 @@ public Builder addTransformResults(int index, com.google.firestore.v1beta1.Value * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1020,9 +1007,8 @@ public Builder addTransformResults(com.google.firestore.v1beta1.Value.Builder bu * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1042,9 +1028,8 @@ public Builder addTransformResults( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1064,9 +1049,8 @@ public Builder addAllTransformResults( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1085,9 +1069,8 @@ public Builder clearTransformResults() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1106,9 +1089,8 @@ public Builder removeTransformResults(int index) { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1120,9 +1102,8 @@ public com.google.firestore.v1beta1.Value.Builder getTransformResultsBuilder(int * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1138,9 +1119,8 @@ public com.google.firestore.v1beta1.ValueOrBuilder getTransformResultsOrBuilder( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1157,9 +1137,8 @@ public com.google.firestore.v1beta1.ValueOrBuilder getTransformResultsOrBuilder( * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1172,9 +1151,8 @@ public com.google.firestore.v1beta1.Value.Builder addTransformResultsBuilder() { * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -1187,9 +1165,8 @@ public com.google.firestore.v1beta1.Value.Builder addTransformResultsBuilder(int * * *
-     * The results of applying each
-     * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-     * in the same order.
+     * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+     * same order.
      * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResultOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResultOrBuilder.java index 9438f1e93e57..ee3cb9ae34f9 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResultOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResultOrBuilder.java @@ -52,9 +52,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -64,9 +63,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -76,9 +74,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -88,9 +85,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; @@ -101,9 +97,8 @@ public interface WriteResultOrBuilder * * *
-   * The results of applying each
-   * [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform],
-   * in the same order.
+   * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+   * same order.
    * 
* * repeated .google.firestore.v1beta1.Value transform_results = 2; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/common.proto b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/common.proto index 027b1a09be9d..87c88a3be630 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/common.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -28,15 +28,14 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A set of field paths on a document. // Used to restrict a get or update operation on a document to a subset of its // fields. // This is different from standard field masks, as this is always scoped to a -// [Document][google.firestore.v1beta1.Document], and takes in account the -// dynamic nature of [Value][google.firestore.v1beta1.Value]. +// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value]. message DocumentMask { - // The list of field paths in the mask. See - // [Document.fields][google.firestore.v1beta1.Document.fields] for a field + // The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field // path syntax reference. repeated string field_paths = 1; } diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/document.proto b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/document.proto index 0e11eff0b542..8a043df59980 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/document.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A Firestore document. // // Must not exceed 1 MiB - 4 bytes. diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/firestore.proto b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/firestore.proto index dc310d70bbdd..b7ba79075a40 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/firestore.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/firestore.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ option java_outer_classname = "FirestoreProto"; option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // Specification of the Firestore API. // The Cloud Firestore service. @@ -94,8 +93,7 @@ service Firestore { // // Documents returned by this method are not guaranteed to be returned in the // same order that they were requested. - rpc BatchGetDocuments(BatchGetDocumentsRequest) - returns (stream BatchGetDocumentsResponse) { + rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" body: "*" @@ -103,8 +101,7 @@ service Firestore { } // Starts a new transaction. - rpc BeginTransaction(BeginTransactionRequest) - returns (BeginTransactionResponse) { + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" @@ -156,8 +153,7 @@ service Firestore { } // Lists all the collection IDs underneath a document. - rpc ListCollectionIds(ListCollectionIdsRequest) - returns (ListCollectionIdsResponse) { + rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" @@ -169,8 +165,7 @@ service Firestore { } } -// The request for -// [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. +// The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. message GetDocumentRequest { // The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -194,8 +189,7 @@ message GetDocumentRequest { } } -// The request for -// [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. +// The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. message ListDocumentsRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -237,17 +231,15 @@ message ListDocumentsRequest { // If the list should show missing documents. A missing document is a // document that does not exist but has sub-documents. These documents will - // be returned with a key but will not have fields, - // [Document.create_time][google.firestore.v1beta1.Document.create_time], or - // [Document.update_time][google.firestore.v1beta1.Document.update_time] set. + // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time], + // or [Document.update_time][google.firestore.v1beta1.Document.update_time] set. // // Requests with `show_missing` may not specify `where` or // `order_by`. bool show_missing = 12; } -// The response for -// [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. +// The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. message ListDocumentsResponse { // The Documents found. repeated Document documents = 1; @@ -256,8 +248,7 @@ message ListDocumentsResponse { string next_page_token = 2; } -// The request for -// [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. +// The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. message CreateDocumentRequest { // The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or @@ -282,8 +273,7 @@ message CreateDocumentRequest { DocumentMask mask = 5; } -// The request for -// [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. +// The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. message UpdateDocumentRequest { // The updated document. // Creates the document if it does not already exist. @@ -309,8 +299,7 @@ message UpdateDocumentRequest { Precondition current_document = 4; } -// The request for -// [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. +// The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. message DeleteDocumentRequest { // The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -321,8 +310,7 @@ message DeleteDocumentRequest { Precondition current_document = 2; } -// The request for -// [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. +// The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -358,8 +346,7 @@ message BatchGetDocumentsRequest { } } -// The streamed response for -// [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. +// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. message BatchGetDocumentsResponse { // A single result. // This can be empty if the server is just returning a transaction. @@ -374,8 +361,7 @@ message BatchGetDocumentsResponse { // 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.v1beta1.BatchGetDocumentsRequest.new_transaction] - // was set in the request. + // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request. bytes transaction = 3; // The time at which the document was read. @@ -385,8 +371,7 @@ message BatchGetDocumentsResponse { google.protobuf.Timestamp read_time = 4; } -// The request for -// [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. +// The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. message BeginTransactionRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -397,15 +382,13 @@ message BeginTransactionRequest { TransactionOptions options = 2; } -// The response for -// [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. +// The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. message BeginTransactionResponse { // The transaction that was started. bytes transaction = 1; } -// The request for -// [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. +// The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. message CommitRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -420,8 +403,7 @@ message CommitRequest { bytes transaction = 3; } -// The response for -// [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. +// The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. message CommitResponse { // The result of applying the writes. // @@ -433,8 +415,7 @@ message CommitResponse { google.protobuf.Timestamp commit_time = 2; } -// The request for -// [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. +// The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. message RollbackRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -444,8 +425,7 @@ message RollbackRequest { bytes transaction = 2; } -// The request for -// [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. +// The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. message RunQueryRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -479,14 +459,12 @@ message RunQueryRequest { } } -// The response for -// [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. +// The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. message RunQueryResponse { // The transaction that was started as part of this request. // Can only be set in the first response, and only if - // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] - // was set in the request. If set, no other fields will be set in this - // response. + // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request. + // If set, no other fields will be set in this response. bytes transaction = 2; // A query result. @@ -539,9 +517,9 @@ message WriteRequest { // A stream token that was previously sent by the server. // // The client should set this field to the token from the most recent - // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. - // This acknowledges that the client has received responses up to this token. - // After sending this token, earlier tokens may not be used anymore. + // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has + // received responses up to this token. After sending this token, earlier + // tokens may not be used anymore. // // The server may close the stream if there are too many unacknowledged // responses. @@ -597,8 +575,7 @@ message ListenRequest { map labels = 4; } -// The response for -// [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]. +// The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]. message ListenResponse { // The supported responses. oneof response_type { @@ -611,8 +588,8 @@ message ListenResponse { // A [Document][google.firestore.v1beta1.Document] has been deleted. DocumentDelete document_delete = 4; - // A [Document][google.firestore.v1beta1.Document] has been removed from a - // target (because it is no longer relevant to that target). + // A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer + // relevant to that target). DocumentRemove document_remove = 6; // A filter to apply to the set of documents previously returned for the @@ -666,9 +643,7 @@ message Target { // If not specified, all matching Documents are returned before any // subsequent changes. oneof resume_type { - // A resume token from a prior - // [TargetChange][google.firestore.v1beta1.TargetChange] for an identical - // target. + // A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target. // // Using a resume token with a different target is unsupported and may fail. bytes resume_token = 4; @@ -760,8 +735,7 @@ message TargetChange { google.protobuf.Timestamp read_time = 6; } -// The request for -// [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. +// The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { // The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -777,8 +751,7 @@ message ListCollectionIdsRequest { string page_token = 3; } -// The response from -// [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. +// The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. message ListCollectionIdsResponse { // The collection ids. repeated string collection_ids = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/query.proto b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/query.proto index 9bd0ad509444..94eec9cbbf3f 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/query.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/firestore/v1beta1/document.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -29,6 +29,7 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A Firestore query. message StructuredQuery { // A selection of a collection, such as `messages as m1`. @@ -114,6 +115,15 @@ message StructuredQuery { Value value = 3; } + // The projection of document's fields to return. + message Projection { + // The fields to return. + // + // If empty, all fields are returned. To only return the name + // of the document, use `['__name__']`. + repeated FieldReference fields = 2; + } + // A filter with a single operand. message UnaryFilter { // A unary operator. @@ -147,20 +157,6 @@ message StructuredQuery { Direction direction = 2; } - // A reference to a field, such as `max(messages.time) as max_time`. - message FieldReference { - string field_path = 2; - } - - // The projection of document's fields to return. - message Projection { - // The fields to return. - // - // If empty, all fields are returned. To only return the name - // of the document, use `['__name__']`. - repeated FieldReference fields = 2; - } - // A sort direction. enum Direction { // Unspecified. @@ -173,6 +169,11 @@ message StructuredQuery { DESCENDING = 2; } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + // The projection to return. Projection select = 1; diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/write.proto b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/write.proto index ff7d3f252d50..4e58cc1216e1 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/write.proto +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/proto/google/firestore/v1beta1/write.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/firestore/v1beta1/common.proto"; import "google/firestore/v1beta1/document.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A write on a document. message Write { // The operation to execute. @@ -41,7 +42,7 @@ message Write { // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. string delete = 2; - // Applies a tranformation to a document. + // Applies a transformation to a document. // At most one `transform` per document is allowed in a given request. // An `update` cannot follow a `transform` on the same document in a given // request. @@ -80,9 +81,8 @@ message DocumentTransform { REQUEST_TIME = 1; } - // The path of the field. See - // [Document.fields][google.firestore.v1beta1.Document.fields] for the field - // path syntax reference. + // The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax + // reference. string field_path = 1; // The transformation to apply on the field. @@ -176,21 +176,18 @@ message WriteResult { // previous update_time. google.protobuf.Timestamp update_time = 1; - // The results of applying each - // [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], - // in the same order. + // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the + // same order. repeated Value transform_results = 2; } // A [Document][google.firestore.v1beta1.Document] has changed. // -// May be the result of multiple [writes][google.firestore.v1beta1.Write], -// including deletes, that ultimately resulted in a new value for the -// [Document][google.firestore.v1beta1.Document]. +// May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that +// ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document]. // -// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages -// may be returned for the same logical change, if multiple targets are -// affected. +// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical +// change, if multiple targets are affected. message DocumentChange { // The new state of the [Document][google.firestore.v1beta1.Document]. // @@ -206,16 +203,13 @@ message DocumentChange { // A [Document][google.firestore.v1beta1.Document] has been deleted. // -// May be the result of multiple [writes][google.firestore.v1beta1.Write], -// including updates, the last of which deleted the -// [Document][google.firestore.v1beta1.Document]. +// May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the +// last of which deleted the [Document][google.firestore.v1beta1.Document]. // -// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages -// may be returned for the same logical delete, if multiple targets are -// affected. +// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical +// delete, if multiple targets are affected. message DocumentDelete { - // The resource name of the [Document][google.firestore.v1beta1.Document] that - // was deleted. + // The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. string document = 1; // A set of target IDs for targets that previously matched this entity. @@ -227,19 +221,16 @@ message DocumentDelete { google.protobuf.Timestamp read_time = 4; } -// A [Document][google.firestore.v1beta1.Document] has been removed from the -// view of the targets. +// A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets. // // Sent if the document is no longer relevant to a target and is out of view. // Can be sent instead of a DocumentDelete or a DocumentChange if the server // can not send the new value of the document. // -// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages -// may be returned for the same logical write or delete, if multiple targets are -// affected. +// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical +// write or delete, if multiple targets are affected. message DocumentRemove { - // The resource name of the [Document][google.firestore.v1beta1.Document] that - // has gone out of view. + // The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. string document = 1; // A set of target IDs for targets that previously matched this document. @@ -256,8 +247,7 @@ message ExistenceFilter { // The target ID to which this filter applies. int32 target_id = 1; - // The total count of documents that match - // [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. + // The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. // // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java new file mode 100644 index 000000000000..8e2bc0f78852 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java @@ -0,0 +1,1272 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.firestore.v1.stub.FirestoreAdminStub; +import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Operations are created by service `FirestoreAdmin`, but are accessed via + * service `google.longrunning.Operations`. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+ *   Index index = Index.newBuilder().build();
+ *   Operation response = firestoreAdminClient.createIndex(formattedParent, index);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the firestoreAdminClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of FirestoreAdminSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * FirestoreAdminSettings firestoreAdminSettings =
+ *     FirestoreAdminSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * FirestoreAdminClient firestoreAdminClient =
+ *     FirestoreAdminClient.create(firestoreAdminSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * FirestoreAdminSettings firestoreAdminSettings =
+ *     FirestoreAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FirestoreAdminClient firestoreAdminClient =
+ *     FirestoreAdminClient.create(firestoreAdminSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class FirestoreAdminClient implements BackgroundResource { + private final FirestoreAdminSettings settings; + private final FirestoreAdminStub stub; + + private static final PathTemplate DATABASE_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/databases/{database}"); + + private static final PathTemplate PARENT_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/collectionGroups/{collection_id}"); + + private static final PathTemplate INDEX_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id}"); + + private static final PathTemplate FIELD_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id}"); + + /** Formats a string containing the fully-qualified path to represent a database resource. */ + public static final String formatDatabaseName(String project, String database) { + return DATABASE_PATH_TEMPLATE.instantiate( + "project", project, + "database", database); + } + + /** Formats a string containing the fully-qualified path to represent a parent resource. */ + public static final String formatParentName( + String project, String database, String collectionId) { + return PARENT_PATH_TEMPLATE.instantiate( + "project", project, + "database", database, + "collection_id", collectionId); + } + + /** Formats a string containing the fully-qualified path to represent a index resource. */ + public static final String formatIndexName( + String project, String database, String collectionId, String indexId) { + return INDEX_PATH_TEMPLATE.instantiate( + "project", project, + "database", database, + "collection_id", collectionId, + "index_id", indexId); + } + + /** Formats a string containing the fully-qualified path to represent a field resource. */ + public static final String formatFieldName( + String project, String database, String collectionId, String fieldId) { + return FIELD_PATH_TEMPLATE.instantiate( + "project", project, + "database", database, + "collection_id", collectionId, + "field_id", fieldId); + } + + /** + * Parses the project from the given fully-qualified path which represents a database resource. + */ + public static final String parseProjectFromDatabaseName(String databaseName) { + return DATABASE_PATH_TEMPLATE.parse(databaseName).get("project"); + } + + /** + * Parses the database from the given fully-qualified path which represents a database resource. + */ + public static final String parseDatabaseFromDatabaseName(String databaseName) { + return DATABASE_PATH_TEMPLATE.parse(databaseName).get("database"); + } + + /** Parses the project from the given fully-qualified path which represents a parent resource. */ + public static final String parseProjectFromParentName(String parentName) { + return PARENT_PATH_TEMPLATE.parse(parentName).get("project"); + } + + /** Parses the database from the given fully-qualified path which represents a parent resource. */ + public static final String parseDatabaseFromParentName(String parentName) { + return PARENT_PATH_TEMPLATE.parse(parentName).get("database"); + } + + /** + * Parses the collection_id from the given fully-qualified path which represents a parent + * resource. + */ + public static final String parseCollectionIdFromParentName(String parentName) { + return PARENT_PATH_TEMPLATE.parse(parentName).get("collection_id"); + } + + /** Parses the project from the given fully-qualified path which represents a index resource. */ + public static final String parseProjectFromIndexName(String indexName) { + return INDEX_PATH_TEMPLATE.parse(indexName).get("project"); + } + + /** Parses the database from the given fully-qualified path which represents a index resource. */ + public static final String parseDatabaseFromIndexName(String indexName) { + return INDEX_PATH_TEMPLATE.parse(indexName).get("database"); + } + + /** + * Parses the collection_id from the given fully-qualified path which represents a index resource. + */ + public static final String parseCollectionIdFromIndexName(String indexName) { + return INDEX_PATH_TEMPLATE.parse(indexName).get("collection_id"); + } + + /** Parses the index_id from the given fully-qualified path which represents a index resource. */ + public static final String parseIndexIdFromIndexName(String indexName) { + return INDEX_PATH_TEMPLATE.parse(indexName).get("index_id"); + } + + /** Parses the project from the given fully-qualified path which represents a field resource. */ + public static final String parseProjectFromFieldName(String fieldName) { + return FIELD_PATH_TEMPLATE.parse(fieldName).get("project"); + } + + /** Parses the database from the given fully-qualified path which represents a field resource. */ + public static final String parseDatabaseFromFieldName(String fieldName) { + return FIELD_PATH_TEMPLATE.parse(fieldName).get("database"); + } + + /** + * Parses the collection_id from the given fully-qualified path which represents a field resource. + */ + public static final String parseCollectionIdFromFieldName(String fieldName) { + return FIELD_PATH_TEMPLATE.parse(fieldName).get("collection_id"); + } + + /** Parses the field_id from the given fully-qualified path which represents a field resource. */ + public static final String parseFieldIdFromFieldName(String fieldName) { + return FIELD_PATH_TEMPLATE.parse(fieldName).get("field_id"); + } + + /** Constructs an instance of FirestoreAdminClient with default settings. */ + public static final FirestoreAdminClient create() throws IOException { + return create(FirestoreAdminSettings.newBuilder().build()); + } + + /** + * Constructs an instance of FirestoreAdminClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final FirestoreAdminClient create(FirestoreAdminSettings settings) + throws IOException { + return new FirestoreAdminClient(settings); + } + + /** + * Constructs an instance of FirestoreAdminClient, using the given stub for making calls. This is + * for advanced usage - prefer to use FirestoreAdminSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final FirestoreAdminClient create(FirestoreAdminStub stub) { + return new FirestoreAdminClient(stub); + } + + /** + * Constructs an instance of FirestoreAdminClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected FirestoreAdminClient(FirestoreAdminSettings settings) throws IOException { + this.settings = settings; + this.stub = ((FirestoreAdminStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected FirestoreAdminClient(FirestoreAdminStub stub) { + this.settings = null; + this.stub = stub; + } + + public final FirestoreAdminSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public FirestoreAdminStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a composite index. This returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the + * status of the creation. The metadata for the operation will be the type + * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   Index index = Index.newBuilder().build();
+   *   Operation response = firestoreAdminClient.createIndex(formattedParent, index);
+   * }
+   * 
+ * + * @param parent A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param index The composite index to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation createIndex(String parent, Index index) { + PARENT_PATH_TEMPLATE.validate(parent, "createIndex"); + CreateIndexRequest request = + CreateIndexRequest.newBuilder().setParent(parent).setIndex(index).build(); + return createIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a composite index. This returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the + * status of the creation. The metadata for the operation will be the type + * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   Index index = Index.newBuilder().build();
+   *   CreateIndexRequest request = CreateIndexRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setIndex(index)
+   *     .build();
+   *   Operation response = firestoreAdminClient.createIndex(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation createIndex(CreateIndexRequest request) { + return createIndexCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a composite index. This returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the + * status of the creation. The metadata for the operation will be the type + * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   Index index = Index.newBuilder().build();
+   *   CreateIndexRequest request = CreateIndexRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setIndex(index)
+   *     .build();
+   *   ApiFuture<Operation> future = firestoreAdminClient.createIndexCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createIndexCallable() { + return stub.createIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists composite indexes. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   for (Index element : firestoreAdminClient.listIndexes(formattedParent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIndexesPagedResponse listIndexes(String parent) { + PARENT_PATH_TEMPLATE.validate(parent, "listIndexes"); + ListIndexesRequest request = ListIndexesRequest.newBuilder().setParent(parent).build(); + return listIndexes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists composite indexes. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   ListIndexesRequest request = ListIndexesRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (Index element : firestoreAdminClient.listIndexes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) { + return listIndexesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists composite indexes. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   ListIndexesRequest request = ListIndexesRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListIndexesPagedResponse> future = firestoreAdminClient.listIndexesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Index element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listIndexesPagedCallable() { + return stub.listIndexesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists composite indexes. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   ListIndexesRequest request = ListIndexesRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListIndexesResponse response = firestoreAdminClient.listIndexesCallable().call(request);
+   *     for (Index element : response.getIndexesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listIndexesCallable() { + return stub.listIndexesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatIndexName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   Index response = firestoreAdminClient.getIndex(formattedName);
+   * }
+   * 
+ * + * @param name A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Index getIndex(String name) { + INDEX_PATH_TEMPLATE.validate(name, "getIndex"); + GetIndexRequest request = GetIndexRequest.newBuilder().setName(name).build(); + return getIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatIndexName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   GetIndexRequest request = GetIndexRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Index response = firestoreAdminClient.getIndex(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Index getIndex(GetIndexRequest request) { + return getIndexCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatIndexName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   GetIndexRequest request = GetIndexRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Index> future = firestoreAdminClient.getIndexCallable().futureCall(request);
+   *   // Do something
+   *   Index response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getIndexCallable() { + return stub.getIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatIndexName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   firestoreAdminClient.deleteIndex(formattedName);
+   * }
+   * 
+ * + * @param name A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIndex(String name) { + INDEX_PATH_TEMPLATE.validate(name, "deleteIndex"); + DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build(); + deleteIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatIndexName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   firestoreAdminClient.deleteIndex(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIndex(DeleteIndexRequest request) { + deleteIndexCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatIndexName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Void> future = firestoreAdminClient.deleteIndexCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteIndexCallable() { + return stub.deleteIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]");
+   *   Operation response = firestoreAdminClient.importDocuments(formattedName);
+   * }
+   * 
+ * + * @param name Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation importDocuments(String name) { + DATABASE_PATH_TEMPLATE.validate(name, "importDocuments"); + ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder().setName(name).build(); + return importDocuments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]");
+   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Operation response = firestoreAdminClient.importDocuments(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation importDocuments(ImportDocumentsRequest request) { + return importDocumentsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]");
+   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Operation> future = firestoreAdminClient.importDocumentsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable importDocumentsCallable() { + return stub.importDocumentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage + * system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the + * export. The export occurs in the background and its progress can be monitored and managed via + * the Operation resource that is created. The output of an export may only be used once the + * associated operation is done. If an export operation is cancelled before completion it may + * leave partial data behind in Google Cloud Storage. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]");
+   *   Operation response = firestoreAdminClient.exportDocuments(formattedName);
+   * }
+   * 
+ * + * @param name Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation exportDocuments(String name) { + DATABASE_PATH_TEMPLATE.validate(name, "exportDocuments"); + ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder().setName(name).build(); + return exportDocuments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage + * system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the + * export. The export occurs in the background and its progress can be monitored and managed via + * the Operation resource that is created. The output of an export may only be used once the + * associated operation is done. If an export operation is cancelled before completion it may + * leave partial data behind in Google Cloud Storage. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]");
+   *   ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Operation response = firestoreAdminClient.exportDocuments(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation exportDocuments(ExportDocumentsRequest request) { + return exportDocumentsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage + * system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the + * export. The export occurs in the background and its progress can be monitored and managed via + * the Operation resource that is created. The output of an export may only be used once the + * associated operation is done. If an export operation is cancelled before completion it may + * leave partial data behind in Google Cloud Storage. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]");
+   *   ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Operation> future = firestoreAdminClient.exportDocumentsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable exportDocumentsCallable() { + return stub.exportDocumentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the metadata and configuration for a Field. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatFieldName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
+   *   Field response = firestoreAdminClient.getField(formattedName);
+   * }
+   * 
+ * + * @param name A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Field getField(String name) { + FIELD_PATH_TEMPLATE.validate(name, "getField"); + GetFieldRequest request = GetFieldRequest.newBuilder().setName(name).build(); + return getField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the metadata and configuration for a Field. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatFieldName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
+   *   GetFieldRequest request = GetFieldRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Field response = firestoreAdminClient.getField(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Field getField(GetFieldRequest request) { + return getFieldCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the metadata and configuration for a Field. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedName = FirestoreAdminClient.formatFieldName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
+   *   GetFieldRequest request = GetFieldRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Field> future = firestoreAdminClient.getFieldCallable().futureCall(request);
+   *   // Do something
+   *   Field response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getFieldCallable() { + return stub.getFieldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   for (Field element : firestoreAdminClient.listFields(formattedParent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFieldsPagedResponse listFields(String parent) { + PARENT_PATH_TEMPLATE.validate(parent, "listFields"); + ListFieldsRequest request = ListFieldsRequest.newBuilder().setParent(parent).build(); + return listFields(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (Field element : firestoreAdminClient.listFields(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFieldsPagedResponse listFields(ListFieldsRequest request) { + return listFieldsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListFieldsPagedResponse> future = firestoreAdminClient.listFieldsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Field element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listFieldsPagedCallable() { + return stub.listFieldsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String formattedParent = FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListFieldsResponse response = firestoreAdminClient.listFieldsCallable().call(request);
+   *     for (Field element : response.getFieldsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listFieldsCallable() { + return stub.listFieldsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   Operation response = firestoreAdminClient.updateField(field);
+   * }
+   * 
+ * + * @param field The field to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation updateField(Field field) { + + UpdateFieldRequest request = UpdateFieldRequest.newBuilder().setField(field).build(); + return updateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
+   *     .setField(field)
+   *     .build();
+   *   Operation response = firestoreAdminClient.updateField(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operation updateField(UpdateFieldRequest request) { + return updateFieldCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
+   *     .setField(field)
+   *     .build();
+   *   ApiFuture<Operation> future = firestoreAdminClient.updateFieldCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateFieldCallable() { + return stub.updateFieldCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListIndexesPagedResponse + extends AbstractPagedListResponse< + ListIndexesRequest, + ListIndexesResponse, + Index, + ListIndexesPage, + ListIndexesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIndexesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListIndexesPagedResponse apply(ListIndexesPage input) { + return new ListIndexesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListIndexesPagedResponse(ListIndexesPage page) { + super(page, ListIndexesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIndexesPage + extends AbstractPage { + + private ListIndexesPage( + PageContext context, + ListIndexesResponse response) { + super(context, response); + } + + private static ListIndexesPage createEmptyPage() { + return new ListIndexesPage(null, null); + } + + @Override + protected ListIndexesPage createPage( + PageContext context, + ListIndexesResponse response) { + return new ListIndexesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIndexesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIndexesRequest, + ListIndexesResponse, + Index, + ListIndexesPage, + ListIndexesFixedSizeCollection> { + + private ListIndexesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIndexesFixedSizeCollection createEmptyCollection() { + return new ListIndexesFixedSizeCollection(null, 0); + } + + @Override + protected ListIndexesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIndexesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListFieldsPagedResponse + extends AbstractPagedListResponse< + ListFieldsRequest, + ListFieldsResponse, + Field, + ListFieldsPage, + ListFieldsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFieldsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListFieldsPagedResponse apply(ListFieldsPage input) { + return new ListFieldsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListFieldsPagedResponse(ListFieldsPage page) { + super(page, ListFieldsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFieldsPage + extends AbstractPage { + + private ListFieldsPage( + PageContext context, + ListFieldsResponse response) { + super(context, response); + } + + private static ListFieldsPage createEmptyPage() { + return new ListFieldsPage(null, null); + } + + @Override + protected ListFieldsPage createPage( + PageContext context, + ListFieldsResponse response) { + return new ListFieldsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFieldsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFieldsRequest, + ListFieldsResponse, + Field, + ListFieldsPage, + ListFieldsFixedSizeCollection> { + + private ListFieldsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFieldsFixedSizeCollection createEmptyCollection() { + return new ListFieldsFixedSizeCollection(null, 0); + } + + @Override + protected ListFieldsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFieldsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java new file mode 100644 index 000000000000..2d37ef3d5226 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java @@ -0,0 +1,278 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1; + +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListFieldsPagedResponse; +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link FirestoreAdminClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (firestore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of createIndex to 30 seconds: + * + *

+ * 
+ * FirestoreAdminSettings.Builder firestoreAdminSettingsBuilder =
+ *     FirestoreAdminSettings.newBuilder();
+ * firestoreAdminSettingsBuilder.createIndexSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * FirestoreAdminSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class FirestoreAdminSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createIndex. */ + public UnaryCallSettings createIndexSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).createIndexSettings(); + } + + /** Returns the object with the settings used for calls to listIndexes. */ + public PagedCallSettings + listIndexesSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).listIndexesSettings(); + } + + /** Returns the object with the settings used for calls to getIndex. */ + public UnaryCallSettings getIndexSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).getIndexSettings(); + } + + /** Returns the object with the settings used for calls to deleteIndex. */ + public UnaryCallSettings deleteIndexSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).deleteIndexSettings(); + } + + /** Returns the object with the settings used for calls to importDocuments. */ + public UnaryCallSettings importDocumentsSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsSettings(); + } + + /** Returns the object with the settings used for calls to exportDocuments. */ + public UnaryCallSettings exportDocumentsSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).exportDocumentsSettings(); + } + + /** Returns the object with the settings used for calls to getField. */ + public UnaryCallSettings getFieldSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).getFieldSettings(); + } + + /** Returns the object with the settings used for calls to listFields. */ + public PagedCallSettings + listFieldsSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).listFieldsSettings(); + } + + /** Returns the object with the settings used for calls to updateField. */ + public UnaryCallSettings updateFieldSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).updateFieldSettings(); + } + + public static final FirestoreAdminSettings create(FirestoreAdminStubSettings stub) + throws IOException { + return new FirestoreAdminSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return FirestoreAdminStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return FirestoreAdminStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return FirestoreAdminStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return FirestoreAdminStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return FirestoreAdminStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return FirestoreAdminStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return FirestoreAdminStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FirestoreAdminSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for FirestoreAdminSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(FirestoreAdminStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(FirestoreAdminStubSettings.newBuilder()); + } + + protected Builder(FirestoreAdminSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(FirestoreAdminStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public FirestoreAdminStubSettings.Builder getStubSettingsBuilder() { + return ((FirestoreAdminStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createIndex. */ + public UnaryCallSettings.Builder createIndexSettings() { + return getStubSettingsBuilder().createIndexSettings(); + } + + /** Returns the builder for the settings used for calls to listIndexes. */ + public PagedCallSettings.Builder< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + listIndexesSettings() { + return getStubSettingsBuilder().listIndexesSettings(); + } + + /** Returns the builder for the settings used for calls to getIndex. */ + public UnaryCallSettings.Builder getIndexSettings() { + return getStubSettingsBuilder().getIndexSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIndex. */ + public UnaryCallSettings.Builder deleteIndexSettings() { + return getStubSettingsBuilder().deleteIndexSettings(); + } + + /** Returns the builder for the settings used for calls to importDocuments. */ + public UnaryCallSettings.Builder importDocumentsSettings() { + return getStubSettingsBuilder().importDocumentsSettings(); + } + + /** Returns the builder for the settings used for calls to exportDocuments. */ + public UnaryCallSettings.Builder exportDocumentsSettings() { + return getStubSettingsBuilder().exportDocumentsSettings(); + } + + /** Returns the builder for the settings used for calls to getField. */ + public UnaryCallSettings.Builder getFieldSettings() { + return getStubSettingsBuilder().getFieldSettings(); + } + + /** Returns the builder for the settings used for calls to listFields. */ + public PagedCallSettings.Builder + listFieldsSettings() { + return getStubSettingsBuilder().listFieldsSettings(); + } + + /** Returns the builder for the settings used for calls to updateField. */ + public UnaryCallSettings.Builder updateFieldSettings() { + return getStubSettingsBuilder().updateFieldSettings(); + } + + @Override + public FirestoreAdminSettings build() throws IOException { + return new FirestoreAdminSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java index 857ce007cb94..e5cc08d0913c 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java @@ -30,6 +30,7 @@ import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.firestore.v1.stub.FirestoreStub; import com.google.cloud.firestore.v1.stub.FirestoreStubSettings; +import com.google.common.util.concurrent.MoreExecutors; import com.google.firestore.v1.BatchGetDocumentsRequest; import com.google.firestore.v1.BatchGetDocumentsResponse; import com.google.firestore.v1.BeginTransactionRequest; @@ -1143,7 +1144,8 @@ public static ApiFuture createAsync( public ListDocumentsPagedResponse apply(ListDocumentsPage input) { return new ListDocumentsPagedResponse(input); } - }); + }, + MoreExecutors.directExecutor()); } private ListDocumentsPagedResponse(ListDocumentsPage page) { @@ -1223,7 +1225,8 @@ public static ApiFuture createAsync( public ListCollectionIdsPagedResponse apply(ListCollectionIdsPage input) { return new ListCollectionIdsPagedResponse(input); } - }); + }, + MoreExecutors.directExecutor()); } private ListCollectionIdsPagedResponse(ListCollectionIdsPage page) { diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java new file mode 100644 index 000000000000..f1b03ec48afe --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java @@ -0,0 +1,97 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1.stub; + +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListFieldsPagedResponse; +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Google Cloud Firestore Admin API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class FirestoreAdminStub implements BackgroundResource { + + public UnaryCallable createIndexCallable() { + throw new UnsupportedOperationException("Not implemented: createIndexCallable()"); + } + + public UnaryCallable listIndexesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listIndexesPagedCallable()"); + } + + public UnaryCallable listIndexesCallable() { + throw new UnsupportedOperationException("Not implemented: listIndexesCallable()"); + } + + public UnaryCallable getIndexCallable() { + throw new UnsupportedOperationException("Not implemented: getIndexCallable()"); + } + + public UnaryCallable deleteIndexCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIndexCallable()"); + } + + public UnaryCallable importDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()"); + } + + public UnaryCallable exportDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: exportDocumentsCallable()"); + } + + public UnaryCallable getFieldCallable() { + throw new UnsupportedOperationException("Not implemented: getFieldCallable()"); + } + + public UnaryCallable listFieldsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFieldsPagedCallable()"); + } + + public UnaryCallable listFieldsCallable() { + throw new UnsupportedOperationException("Not implemented: listFieldsCallable()"); + } + + public UnaryCallable updateFieldCallable() { + throw new UnsupportedOperationException("Not implemented: updateFieldCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java new file mode 100644 index 000000000000..fcbca7435c55 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java @@ -0,0 +1,595 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1.stub; + +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListFieldsPagedResponse; +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link FirestoreAdminStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (firestore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of createIndex to 30 seconds: + * + *

+ * 
+ * FirestoreAdminStubSettings.Builder firestoreAdminSettingsBuilder =
+ *     FirestoreAdminStubSettings.newBuilder();
+ * firestoreAdminSettingsBuilder.createIndexSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * FirestoreAdminStubSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class FirestoreAdminStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/datastore") + .build(); + + private final UnaryCallSettings createIndexSettings; + private final PagedCallSettings + listIndexesSettings; + private final UnaryCallSettings getIndexSettings; + private final UnaryCallSettings deleteIndexSettings; + private final UnaryCallSettings importDocumentsSettings; + private final UnaryCallSettings exportDocumentsSettings; + private final UnaryCallSettings getFieldSettings; + private final PagedCallSettings + listFieldsSettings; + private final UnaryCallSettings updateFieldSettings; + + /** Returns the object with the settings used for calls to createIndex. */ + public UnaryCallSettings createIndexSettings() { + return createIndexSettings; + } + + /** Returns the object with the settings used for calls to listIndexes. */ + public PagedCallSettings + listIndexesSettings() { + return listIndexesSettings; + } + + /** Returns the object with the settings used for calls to getIndex. */ + public UnaryCallSettings getIndexSettings() { + return getIndexSettings; + } + + /** Returns the object with the settings used for calls to deleteIndex. */ + public UnaryCallSettings deleteIndexSettings() { + return deleteIndexSettings; + } + + /** Returns the object with the settings used for calls to importDocuments. */ + public UnaryCallSettings importDocumentsSettings() { + return importDocumentsSettings; + } + + /** Returns the object with the settings used for calls to exportDocuments. */ + public UnaryCallSettings exportDocumentsSettings() { + return exportDocumentsSettings; + } + + /** Returns the object with the settings used for calls to getField. */ + public UnaryCallSettings getFieldSettings() { + return getFieldSettings; + } + + /** Returns the object with the settings used for calls to listFields. */ + public PagedCallSettings + listFieldsSettings() { + return listFieldsSettings; + } + + /** Returns the object with the settings used for calls to updateField. */ + public UnaryCallSettings updateFieldSettings() { + return updateFieldSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public FirestoreAdminStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcFirestoreAdminStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "firestore.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(FirestoreAdminStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FirestoreAdminStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createIndexSettings = settingsBuilder.createIndexSettings().build(); + listIndexesSettings = settingsBuilder.listIndexesSettings().build(); + getIndexSettings = settingsBuilder.getIndexSettings().build(); + deleteIndexSettings = settingsBuilder.deleteIndexSettings().build(); + importDocumentsSettings = settingsBuilder.importDocumentsSettings().build(); + exportDocumentsSettings = settingsBuilder.exportDocumentsSettings().build(); + getFieldSettings = settingsBuilder.getFieldSettings().build(); + listFieldsSettings = settingsBuilder.listFieldsSettings().build(); + updateFieldSettings = settingsBuilder.updateFieldSettings().build(); + } + + private static final PagedListDescriptor + LIST_INDEXES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIndexesRequest injectToken(ListIndexesRequest payload, String token) { + return ListIndexesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListIndexesRequest injectPageSize(ListIndexesRequest payload, int pageSize) { + return ListIndexesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListIndexesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIndexesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListIndexesResponse payload) { + return payload.getIndexesList() != null + ? payload.getIndexesList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor + LIST_FIELDS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFieldsRequest injectToken(ListFieldsRequest payload, String token) { + return ListFieldsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFieldsRequest injectPageSize(ListFieldsRequest payload, int pageSize) { + return ListFieldsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFieldsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFieldsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFieldsResponse payload) { + return payload.getFieldsList() != null + ? payload.getFieldsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + LIST_INDEXES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIndexesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INDEXES_PAGE_STR_DESC, request, context); + return ListIndexesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListFieldsRequest, ListFieldsResponse, ListFieldsPagedResponse> + LIST_FIELDS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFieldsRequest, ListFieldsResponse, ListFieldsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFieldsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_FIELDS_PAGE_STR_DESC, request, context); + return ListFieldsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for FirestoreAdminStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder createIndexSettings; + private final PagedCallSettings.Builder< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + listIndexesSettings; + private final UnaryCallSettings.Builder getIndexSettings; + private final UnaryCallSettings.Builder deleteIndexSettings; + private final UnaryCallSettings.Builder + importDocumentsSettings; + private final UnaryCallSettings.Builder + exportDocumentsSettings; + private final UnaryCallSettings.Builder getFieldSettings; + private final PagedCallSettings.Builder< + ListFieldsRequest, ListFieldsResponse, ListFieldsPagedResponse> + listFieldsSettings; + private final UnaryCallSettings.Builder updateFieldSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listIndexesSettings = PagedCallSettings.newBuilder(LIST_INDEXES_PAGE_STR_FACT); + + getIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + importDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + exportDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listFieldsSettings = PagedCallSettings.newBuilder(LIST_FIELDS_PAGE_STR_FACT); + + updateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createIndexSettings, + listIndexesSettings, + getIndexSettings, + deleteIndexSettings, + importDocumentsSettings, + exportDocumentsSettings, + getFieldSettings, + listFieldsSettings, + updateFieldSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listIndexesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .importDocumentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .exportDocumentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getFieldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listFieldsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateFieldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(FirestoreAdminStubSettings settings) { + super(settings); + + createIndexSettings = settings.createIndexSettings.toBuilder(); + listIndexesSettings = settings.listIndexesSettings.toBuilder(); + getIndexSettings = settings.getIndexSettings.toBuilder(); + deleteIndexSettings = settings.deleteIndexSettings.toBuilder(); + importDocumentsSettings = settings.importDocumentsSettings.toBuilder(); + exportDocumentsSettings = settings.exportDocumentsSettings.toBuilder(); + getFieldSettings = settings.getFieldSettings.toBuilder(); + listFieldsSettings = settings.listFieldsSettings.toBuilder(); + updateFieldSettings = settings.updateFieldSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createIndexSettings, + listIndexesSettings, + getIndexSettings, + deleteIndexSettings, + importDocumentsSettings, + exportDocumentsSettings, + getFieldSettings, + listFieldsSettings, + updateFieldSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createIndex. */ + public UnaryCallSettings.Builder createIndexSettings() { + return createIndexSettings; + } + + /** Returns the builder for the settings used for calls to listIndexes. */ + public PagedCallSettings.Builder< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + listIndexesSettings() { + return listIndexesSettings; + } + + /** Returns the builder for the settings used for calls to getIndex. */ + public UnaryCallSettings.Builder getIndexSettings() { + return getIndexSettings; + } + + /** Returns the builder for the settings used for calls to deleteIndex. */ + public UnaryCallSettings.Builder deleteIndexSettings() { + return deleteIndexSettings; + } + + /** Returns the builder for the settings used for calls to importDocuments. */ + public UnaryCallSettings.Builder importDocumentsSettings() { + return importDocumentsSettings; + } + + /** Returns the builder for the settings used for calls to exportDocuments. */ + public UnaryCallSettings.Builder exportDocumentsSettings() { + return exportDocumentsSettings; + } + + /** Returns the builder for the settings used for calls to getField. */ + public UnaryCallSettings.Builder getFieldSettings() { + return getFieldSettings; + } + + /** Returns the builder for the settings used for calls to listFields. */ + public PagedCallSettings.Builder + listFieldsSettings() { + return listFieldsSettings; + } + + /** Returns the builder for the settings used for calls to updateField. */ + public UnaryCallSettings.Builder updateFieldSettings() { + return updateFieldSettings; + } + + @Override + public FirestoreAdminStubSettings build() throws IOException { + return new FirestoreAdminStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java new file mode 100644 index 000000000000..7b5a94bdde77 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Google Cloud Firestore Admin API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcFirestoreAdminCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java new file mode 100644 index 000000000000..216ea01dcca6 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java @@ -0,0 +1,333 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1.stub; + +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListFieldsPagedResponse; +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Google Cloud Firestore Admin API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcFirestoreAdminStub extends FirestoreAdminStub { + + private static final MethodDescriptor createIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/CreateIndex") + .setRequestMarshaller(ProtoUtils.marshaller(CreateIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listIndexesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ListIndexes") + .setRequestMarshaller(ProtoUtils.marshaller(ListIndexesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIndexesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetIndex") + .setRequestMarshaller(ProtoUtils.marshaller(GetIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Index.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteIndex") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + importDocumentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ImportDocuments") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportDocumentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + exportDocumentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ExportDocuments") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportDocumentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getFieldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetField") + .setRequestMarshaller(ProtoUtils.marshaller(GetFieldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Field.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listFieldsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ListFields") + .setRequestMarshaller(ProtoUtils.marshaller(ListFieldsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListFieldsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateFieldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/UpdateField") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateFieldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable createIndexCallable; + private final UnaryCallable listIndexesCallable; + private final UnaryCallable + listIndexesPagedCallable; + private final UnaryCallable getIndexCallable; + private final UnaryCallable deleteIndexCallable; + private final UnaryCallable importDocumentsCallable; + private final UnaryCallable exportDocumentsCallable; + private final UnaryCallable getFieldCallable; + private final UnaryCallable listFieldsCallable; + private final UnaryCallable listFieldsPagedCallable; + private final UnaryCallable updateFieldCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcFirestoreAdminStub create(FirestoreAdminStubSettings settings) + throws IOException { + return new GrpcFirestoreAdminStub(settings, ClientContext.create(settings)); + } + + public static final GrpcFirestoreAdminStub create(ClientContext clientContext) + throws IOException { + return new GrpcFirestoreAdminStub( + FirestoreAdminStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcFirestoreAdminStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcFirestoreAdminStub( + FirestoreAdminStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcFirestoreAdminStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcFirestoreAdminStub(FirestoreAdminStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcFirestoreAdminCallableFactory()); + } + + /** + * Constructs an instance of GrpcFirestoreAdminStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcFirestoreAdminStub( + FirestoreAdminStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings createIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createIndexMethodDescriptor) + .build(); + GrpcCallSettings listIndexesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listIndexesMethodDescriptor) + .build(); + GrpcCallSettings getIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIndexMethodDescriptor) + .build(); + GrpcCallSettings deleteIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIndexMethodDescriptor) + .build(); + GrpcCallSettings importDocumentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importDocumentsMethodDescriptor) + .build(); + GrpcCallSettings exportDocumentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportDocumentsMethodDescriptor) + .build(); + GrpcCallSettings getFieldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFieldMethodDescriptor) + .build(); + GrpcCallSettings listFieldsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFieldsMethodDescriptor) + .build(); + GrpcCallSettings updateFieldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFieldMethodDescriptor) + .build(); + + this.createIndexCallable = + callableFactory.createUnaryCallable( + createIndexTransportSettings, settings.createIndexSettings(), clientContext); + this.listIndexesCallable = + callableFactory.createUnaryCallable( + listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); + this.listIndexesPagedCallable = + callableFactory.createPagedCallable( + listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); + this.getIndexCallable = + callableFactory.createUnaryCallable( + getIndexTransportSettings, settings.getIndexSettings(), clientContext); + this.deleteIndexCallable = + callableFactory.createUnaryCallable( + deleteIndexTransportSettings, settings.deleteIndexSettings(), clientContext); + this.importDocumentsCallable = + callableFactory.createUnaryCallable( + importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext); + this.exportDocumentsCallable = + callableFactory.createUnaryCallable( + exportDocumentsTransportSettings, settings.exportDocumentsSettings(), clientContext); + this.getFieldCallable = + callableFactory.createUnaryCallable( + getFieldTransportSettings, settings.getFieldSettings(), clientContext); + this.listFieldsCallable = + callableFactory.createUnaryCallable( + listFieldsTransportSettings, settings.listFieldsSettings(), clientContext); + this.listFieldsPagedCallable = + callableFactory.createPagedCallable( + listFieldsTransportSettings, settings.listFieldsSettings(), clientContext); + this.updateFieldCallable = + callableFactory.createUnaryCallable( + updateFieldTransportSettings, settings.updateFieldSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable createIndexCallable() { + return createIndexCallable; + } + + public UnaryCallable listIndexesPagedCallable() { + return listIndexesPagedCallable; + } + + public UnaryCallable listIndexesCallable() { + return listIndexesCallable; + } + + public UnaryCallable getIndexCallable() { + return getIndexCallable; + } + + public UnaryCallable deleteIndexCallable() { + return deleteIndexCallable; + } + + public UnaryCallable importDocumentsCallable() { + return importDocumentsCallable; + } + + public UnaryCallable exportDocumentsCallable() { + return exportDocumentsCallable; + } + + public UnaryCallable getFieldCallable() { + return getFieldCallable; + } + + public UnaryCallable listFieldsPagedCallable() { + return listFieldsPagedCallable; + } + + public UnaryCallable listFieldsCallable() { + return listFieldsCallable; + } + + public UnaryCallable updateFieldCallable() { + return updateFieldCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java index ce92bacdefb1..f0e2e21eb346 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java @@ -30,6 +30,7 @@ import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.firestore.v1beta1.stub.FirestoreStub; import com.google.cloud.firestore.v1beta1.stub.FirestoreStubSettings; +import com.google.common.util.concurrent.MoreExecutors; import com.google.firestore.v1beta1.BatchGetDocumentsRequest; import com.google.firestore.v1beta1.BatchGetDocumentsResponse; import com.google.firestore.v1beta1.BeginTransactionRequest; @@ -1143,7 +1144,8 @@ public static ApiFuture createAsync( public ListDocumentsPagedResponse apply(ListDocumentsPage input) { return new ListDocumentsPagedResponse(input); } - }); + }, + MoreExecutors.directExecutor()); } private ListDocumentsPagedResponse(ListDocumentsPage page) { @@ -1223,7 +1225,8 @@ public static ApiFuture createAsync( public ListCollectionIdsPagedResponse apply(ListCollectionIdsPage input) { return new ListCollectionIdsPagedResponse(input); } - }); + }, + MoreExecutors.directExecutor()); } private ListCollectionIdsPagedResponse(ListCollectionIdsPage page) { diff --git a/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java b/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java new file mode 100644 index 000000000000..d71cf13492b2 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java @@ -0,0 +1,485 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1; + +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListFieldsPagedResponse; +import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class FirestoreAdminClientTest { + private static MockFirestoreAdmin mockFirestoreAdmin; + private static MockServiceHelper serviceHelper; + private FirestoreAdminClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockFirestoreAdmin = new MockFirestoreAdmin(); + serviceHelper = + new MockServiceHelper("in-process-1", Arrays.asList(mockFirestoreAdmin)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + FirestoreAdminSettings settings = + FirestoreAdminSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = FirestoreAdminClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createIndexTest() { + String name = "name3373707"; + boolean done = true; + Operation expectedResponse = Operation.newBuilder().setName(name).setDone(done).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedParent = + FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]"); + Index index = Index.newBuilder().build(); + + Operation actualResponse = client.createIndex(formattedParent, index); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIndexRequest actualRequest = (CreateIndexRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(index, actualRequest.getIndex()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedParent = + FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]"); + Index index = Index.newBuilder().build(); + + client.createIndex(formattedParent, index); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listIndexesTest() { + String nextPageToken = ""; + Index indexesElement = Index.newBuilder().build(); + List indexes = Arrays.asList(indexesElement); + ListIndexesResponse expectedResponse = + ListIndexesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllIndexes(indexes) + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedParent = + FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]"); + + ListIndexesPagedResponse pagedListResponse = client.listIndexes(formattedParent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0)); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIndexesRequest actualRequest = (ListIndexesRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listIndexesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedParent = + FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]"); + + client.listIndexes(formattedParent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getIndexTest() { + String name2 = "name2-1052831874"; + Index expectedResponse = Index.newBuilder().setName(name2).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedName = + FirestoreAdminClient.formatIndexName( + "[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]"); + + Index actualResponse = client.getIndex(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIndexRequest actualRequest = (GetIndexRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedName = + FirestoreAdminClient.formatIndexName( + "[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]"); + + client.getIndex(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteIndexTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedName = + FirestoreAdminClient.formatIndexName( + "[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]"); + + client.deleteIndex(formattedName); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIndexRequest actualRequest = (DeleteIndexRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedName = + FirestoreAdminClient.formatIndexName( + "[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]"); + + client.deleteIndex(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void importDocumentsTest() { + String name2 = "name2-1052831874"; + boolean done = true; + Operation expectedResponse = Operation.newBuilder().setName(name2).setDone(done).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]"); + + Operation actualResponse = client.importDocuments(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportDocumentsRequest actualRequest = (ImportDocumentsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void importDocumentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]"); + + client.importDocuments(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void exportDocumentsTest() { + String name2 = "name2-1052831874"; + boolean done = true; + Operation expectedResponse = Operation.newBuilder().setName(name2).setDone(done).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]"); + + Operation actualResponse = client.exportDocuments(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportDocumentsRequest actualRequest = (ExportDocumentsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportDocumentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedName = FirestoreAdminClient.formatDatabaseName("[PROJECT]", "[DATABASE]"); + + client.exportDocuments(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getFieldTest() { + String name2 = "name2-1052831874"; + Field expectedResponse = Field.newBuilder().setName(name2).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedName = + FirestoreAdminClient.formatFieldName( + "[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]"); + + Field actualResponse = client.getField(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFieldRequest actualRequest = (GetFieldRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getFieldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedName = + FirestoreAdminClient.formatFieldName( + "[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]"); + + client.getField(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listFieldsTest() { + String nextPageToken = ""; + Field fieldsElement = Field.newBuilder().build(); + List fields = Arrays.asList(fieldsElement); + ListFieldsResponse expectedResponse = + ListFieldsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllFields(fields) + .build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + String formattedParent = + FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]"); + + ListFieldsPagedResponse pagedListResponse = client.listFields(formattedParent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFieldsList().get(0), resources.get(0)); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFieldsRequest actualRequest = (ListFieldsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listFieldsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String formattedParent = + FirestoreAdminClient.formatParentName("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]"); + + client.listFields(formattedParent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateFieldTest() { + String name = "name3373707"; + boolean done = true; + Operation expectedResponse = Operation.newBuilder().setName(name).setDone(done).build(); + mockFirestoreAdmin.addResponse(expectedResponse); + + Field field = Field.newBuilder().build(); + + Operation actualResponse = client.updateField(field); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFieldRequest actualRequest = (UpdateFieldRequest) actualRequests.get(0); + + Assert.assertEquals(field, actualRequest.getField()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateFieldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + Field field = Field.newBuilder().build(); + + client.updateField(field); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java b/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java new file mode 100644 index 000000000000..86413e0ea045 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdmin.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockFirestoreAdmin implements MockGrpcService { + private final MockFirestoreAdminImpl serviceImpl; + + public MockFirestoreAdmin() { + serviceImpl = new MockFirestoreAdminImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(GeneratedMessageV3 response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java b/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java new file mode 100644 index 000000000000..b660c6efbf41 --- /dev/null +++ b/google-cloud-clients/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java @@ -0,0 +1,203 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.firestore.v1; + +import com.google.api.core.BetaApi; +import com.google.firestore.admin.v1.CreateIndexRequest; +import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.FirestoreAdminGrpc.FirestoreAdminImplBase; +import com.google.firestore.admin.v1.GetFieldRequest; +import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsRequest; +import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.ListFieldsRequest; +import com.google.firestore.admin.v1.ListFieldsResponse; +import com.google.firestore.admin.v1.ListIndexesRequest; +import com.google.firestore.admin.v1.ListIndexesResponse; +import com.google.firestore.admin.v1.UpdateFieldRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockFirestoreAdminImpl extends FirestoreAdminImplBase { + private ArrayList requests; + private Queue responses; + + public MockFirestoreAdminImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(GeneratedMessageV3 response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createIndex(CreateIndexRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listIndexes( + ListIndexesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListIndexesResponse) { + requests.add(request); + responseObserver.onNext((ListIndexesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getIndex(GetIndexRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Index) { + requests.add(request); + responseObserver.onNext((Index) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteIndex(DeleteIndexRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getField(GetFieldRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Field) { + requests.add(request); + responseObserver.onNext((Field) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateField(UpdateFieldRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listFields( + ListFieldsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListFieldsResponse) { + requests.add(request); + responseObserver.onNext((ListFieldsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportDocuments( + ExportDocumentsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void importDocuments( + ImportDocumentsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/google-cloud-firestore/synth.metadata b/google-cloud-clients/google-cloud-firestore/synth.metadata index 3df6ec3fab02..e734f9320b49 100644 --- a/google-cloud-clients/google-cloud-firestore/synth.metadata +++ b/google-cloud-clients/google-cloud-firestore/synth.metadata @@ -1,23 +1,33 @@ { - "updateTime": "2019-03-01T08:44:26.233377Z", + "updateTime": "2019-03-21T21:47:29.543409Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.14", - "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" + "version": "0.16.18", + "dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "41d72d444fbe445f4da89e13be02078734fb7875", - "internalRef": "236230004" + "sha": "76f1680cb7ed663a7fe4f00f95c2d17f99db0662", + "internalRef": "239636872" } } ], "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "firestore-admin", + "apiVersion": "v1", + "language": "java", + "generator": "gapic", + "config": "google/firestore/admin/artman_firestore_v1.yaml" + } + }, { "client": { "source": "googleapis",