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 index fd46aae91523..bd870ef9a5b5 100644 --- 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 @@ -170,8 +170,7 @@ public interface IndexConfigOrBuilder * * *
- * Output only. - * When true, the `Field`'s index configuration is set from the + * 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. *@@ -184,8 +183,7 @@ public interface IndexConfigOrBuilder * * *
- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -198,8 +196,7 @@ public interface IndexConfigOrBuilder * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -408,8 +405,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde * * *- * Output only. - * When true, the `Field`'s index configuration is set from the + * 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. *@@ -426,8 +422,7 @@ public boolean getUsesAncestorConfig() { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -450,8 +445,7 @@ public java.lang.String getAncestorField() { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -1255,8 +1249,7 @@ public java.util.ListgetIndexesBui * * * - * Output only. - * When true, the `Field`'s index configuration is set from the + * 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. *@@ -1270,8 +1263,7 @@ public boolean getUsesAncestorConfig() { * * *- * Output only. - * When true, the `Field`'s index configuration is set from the + * 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. *@@ -1288,8 +1280,7 @@ public Builder setUsesAncestorConfig(boolean value) { * * *- * Output only. - * When true, the `Field`'s index configuration is set from the + * 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. *@@ -1308,8 +1299,7 @@ public Builder clearUsesAncestorConfig() { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -1332,8 +1322,7 @@ public java.lang.String getAncestorField() { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -1356,8 +1345,7 @@ public com.google.protobuf.ByteString getAncestorFieldBytes() { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -1378,8 +1366,7 @@ public Builder setAncestorField(java.lang.String value) { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). @@ -1397,8 +1384,7 @@ public Builder clearAncestorField() { * * *- * Output only. - * Specifies the resource name of the `Field` from which this field'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). 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 index c058711f5eda..6ff72974fda4 100644 --- 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 @@ -72,72 +72,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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" + + "roto\032\027google/api/client.proto\"U\n\022CreateI" + + "ndexRequest\022\016\n\006parent\030\001 \001(\t\022/\n\005index\030\002 \001" + + "(\0132 .google.firestore.admin.v1.Index\"[\n\022" + + "ListIndexesRequest\022\016\n\006parent\030\001 \001(\t\022\016\n\006fi" + + "lter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" + + "ken\030\004 \001(\t\"a\n\023ListIndexesResponse\0221\n\007inde" + + "xes\030\001 \003(\0132 .google.firestore.admin.v1.In" + + "dex\022\027\n\017next_page_token\030\002 \001(\t\"\037\n\017GetIndex" + + "Request\022\014\n\004name\030\001 \001(\t\"\"\n\022DeleteIndexRequ" + + "est\022\014\n\004name\030\001 \001(\t\"v\n\022UpdateFieldRequest\022" + + "/\n\005field\030\001 \001(\0132 .google.firestore.admin." + + "v1.Field\022/\n\013update_mask\030\002 \001(\0132\032.google.p" + + "rotobuf.FieldMask\"\037\n\017GetFieldRequest\022\014\n\004" + + "name\030\001 \001(\t\"Z\n\021ListFieldsRequest\022\016\n\006paren" + + "t\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\022ListFieldsResp" + + "onse\0220\n\006fields\030\001 \003(\0132 .google.firestore." + + "admin.v1.Field\022\027\n\017next_page_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_pr" + + "efix\030\003 \001(\t\"X\n\026ImportDocumentsRequest\022\014\n\004" + + "name\030\001 \001(\t\022\026\n\016collection_ids\030\002 \003(\t\022\030\n\020in" + + "put_uri_prefix\030\003 \001(\t2\375\014\n\016FirestoreAdmin\022" + + "\252\001\n\013CreateIndex\022-.google.firestore.admin" + + ".v1.CreateIndexRequest\032\035.google.longrunn" + + "ing.Operation\"M\202\323\344\223\002G\">/v1/{parent=proje" + + "cts/*/databases/*/collectionGroups/*}/in" + + "dexes:\005index\022\264\001\n\013ListIndexes\022-.google.fi" + + "restore.admin.v1.ListIndexesRequest\032..go" + + "ogle.firestore.admin.v1.ListIndexesRespo" + + "nse\"F\202\323\344\223\002@\022>/v1/{parent=projects/*/data" + + "bases/*/collectionGroups/*}/indexes\022\240\001\n\010" + + "GetIndex\022*.google.firestore.admin.v1.Get" + + "IndexRequest\032 .google.firestore.admin.v1" + + ".Index\"F\202\323\344\223\002@\022>/v1/{name=projects/*/dat" + + "abases/*/collectionGroups/*/indexes/*}\022\234" + + "\001\n\013DeleteIndex\022-.google.firestore.admin." + + "v1.DeleteIndexRequest\032\026.google.protobuf." + + "Empty\"F\202\323\344\223\002@*>/v1/{name=projects/*/data" + + "bases/*/collectionGroups/*/indexes/*}\022\237\001" + + "\n\010GetField\022*.google.firestore.admin.v1.G" + + "etFieldRequest\032 .google.firestore.admin." + + "v1.Field\"E\202\323\344\223\002?\022=/v1/{name=projects/*/d" + + "atabases/*/collectionGroups/*/fields/*}\022" + + "\257\001\n\013UpdateField\022-.google.firestore.admin" + + ".v1.UpdateFieldRequest\032\035.google.longrunn" + + "ing.Operation\"R\202\323\344\223\002L2C/v1/{field.name=p" + + "rojects/*/databases/*/collectionGroups/*" + + "/fields/*}:\005field\022\260\001\n\nListFields\022,.googl" + + "e.firestore.admin.v1.ListFieldsRequest\032-" + + ".google.firestore.admin.v1.ListFieldsRes" + + "ponse\"E\202\323\344\223\002?\022=/v1/{parent=projects/*/da" + + "tabases/*/collectionGroups/*}/fields\022\241\001\n" + + "\017ExportDocuments\0221.google.firestore.admi" + + "n.v1.ExportDocumentsRequest\032\035.google.lon" + + "grunning.Operation\"<\202\323\344\223\0026\"1/v1/{name=pr" + + "ojects/*/databases/*}:exportDocuments:\001*" + + "\022\241\001\n\017ImportDocuments\0221.google.firestore." + + "admin.v1.ImportDocumentsRequest\032\035.google" + + ".longrunning.Operation\"<\202\323\344\223\0026\"1/v1/{nam" + + "e=projects/*/databases/*}:importDocument" + + "s:\001*\032v\312A\030firestore.googleapis.com\322AXhttp" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rm,https://www.googleapis.com/auth/datas" + + "toreB\301\001\n\035com.google.firestore.admin.v1B\023" + + "FirestoreAdminProtoP\001Z>google.golang.org" + + "/genproto/googleapis/firestore/admin/v1;" + + "admin\242\002\004GCFS\252\002\037Google.Cloud.Firestore.Ad" + + "min.V1\312\002\037Google\\Cloud\\Firestore\\Admin\\V1" + + "b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -156,6 +160,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), }, assigner); internal_static_google_firestore_admin_v1_CreateIndexRequest_descriptor = @@ -248,7 +253,9 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); @@ -257,6 +264,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.api.ClientProto.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/Index.java b/google-api-grpc/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java index b7190b86edfc..20ab9250288a 100644 --- 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 @@ -156,6 +156,18 @@ public enum QueryScope implements com.google.protobuf.ProtocolMessageEnum { *COLLECTION = 1;
*/ COLLECTION(1), + /** + * + * + *+ * Indexes with a collection group query scope specified allow queries + * against all collections that has the collection id specified by the + * index. + *+ * + *COLLECTION_GROUP = 2;
+ */ + COLLECTION_GROUP(2), UNRECOGNIZED(-1), ; @@ -181,6 +193,18 @@ public enum QueryScope implements com.google.protobuf.ProtocolMessageEnum { *COLLECTION = 1;
*/ public static final int COLLECTION_VALUE = 1; + /** + * + * + *+ * Indexes with a collection group query scope specified allow queries + * against all collections that has the collection id specified by the + * index. + *+ * + *COLLECTION_GROUP = 2;
+ */ + public static final int COLLECTION_GROUP_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -202,6 +226,8 @@ public static QueryScope forNumber(int value) { return QUERY_SCOPE_UNSPECIFIED; case 1: return COLLECTION; + case 2: + return COLLECTION_GROUP; default: return null; } @@ -1802,8 +1828,7 @@ public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType( * * *- * Output only. - * A server defined name for this index. + * 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. @@ -1826,8 +1851,7 @@ public java.lang.String getName() { * * *- * Output only. - * A server defined name for this index. + * 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. @@ -1997,8 +2021,7 @@ public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilde * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -2010,8 +2033,7 @@ public int getStateValue() { * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -2434,8 +2456,7 @@ public Builder mergeFrom( * * *- * Output only. - * A server defined name for this index. + * 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. @@ -2458,8 +2479,7 @@ public java.lang.String getName() { * * *- * Output only. - * A server defined name for this index. + * 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. @@ -2482,8 +2502,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *- * Output only. - * A server defined name for this index. + * 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. @@ -2504,8 +2523,7 @@ public Builder setName(java.lang.String value) { * * *- * Output only. - * A server defined name for this index. + * 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. @@ -2523,8 +2541,7 @@ public Builder clearName() { * * *- * Output only. - * A server defined name for this index. + * 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. @@ -3143,8 +3160,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder(i * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -3156,8 +3172,7 @@ public int getStateValue() { * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -3171,8 +3186,7 @@ public Builder setStateValue(int value) { * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -3187,8 +3201,7 @@ public com.google.firestore.admin.v1.Index.State getState() { * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -3206,8 +3219,7 @@ public Builder setState(com.google.firestore.admin.v1.Index.State value) { * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
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 index ce495b677d7b..98a582a64bd7 100644 --- 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 @@ -12,8 +12,7 @@ public interface IndexOrBuilder * * *- * Output only. - * A server defined name for this index. + * 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. @@ -26,8 +25,7 @@ public interface IndexOrBuilder * * *- * Output only. - * A server defined name for this index. + * 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. @@ -164,8 +162,7 @@ public interface IndexOrBuilder * * ** *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
@@ -175,8 +172,7 @@ public interface IndexOrBuilder * * *- * Output only. - * The serving state of the index. + * Output only. The serving state of the index. ** *.google.firestore.admin.v1.Index.State state = 4;
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 index ef5191e5fc23..baad08f72a12 100644 --- 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 @@ -31,7 +31,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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" + + "nnotations.proto\"\247\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" @@ -44,15 +44,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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" + + "NTAINS\020\001B\014\n\nvalue_mode\"O\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" + + "\001\022\024\n\020COLLECTION_GROUP\020\002\"I\n\005State\022\025\n\021STAT" + + "E_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002" + + "\022\020\n\014NEEDS_REPAIR\020\003B\270\001\n\035com.google.firest" + + "ore.admin.v1B\nIndexProtoP\001Z>google.golan" + + "g.org/genproto/googleapis/firestore/admi" + + "n/v1;admin\242\002\004GCFS\252\002\037Google.Cloud.Firesto" + + "re.Admin.V1\312\002\037Google\\Cloud\\Firestore\\Adm" + + "in\\V1b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { 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 index a24e1aaf1dc4..14891596d139 100644 --- 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 @@ -28,7 +28,6 @@ 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 @@ -39,14 +38,12 @@ message Field { // The indexes supported for this field. repeated Index indexes = 1; - // Output only. - // When true, the `Field`'s index configuration is set from the + // 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 + // 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). 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 index e753686b200e..234827bef228 100644 --- 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 @@ -23,6 +23,7 @@ import "google/firestore/admin/v1/index.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; @@ -32,10 +33,14 @@ 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 { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // 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]. 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 index 94941d3a0707..f2038c581c47 100644 --- 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 @@ -27,7 +27,6 @@ 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 { @@ -82,6 +81,11 @@ message Index { // 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; + + // Indexes with a collection group query scope specified allow queries + // against all collections that has the collection id specified by the + // index. + COLLECTION_GROUP = 2; } // The state of an index. During index creation, an index will be in the @@ -114,8 +118,7 @@ message Index { NEEDS_REPAIR = 3; } - // Output only. - // A server defined name for this index. + // 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. @@ -143,7 +146,6 @@ message Index { // field path equal to the field path of the associated field. repeated IndexField fields = 3; - // Output only. - // The serving state of the index. + // 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 index 7b56051a5c36..d9dc6f9b9820 100644 --- 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 @@ -28,7 +28,6 @@ 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 index d333d9b7de25..08194fe09341 100644 --- 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 @@ -29,7 +29,6 @@ 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 { @@ -163,6 +162,17 @@ message ExportDocumentsResponse { string output_uri_prefix = 1; } +// 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; +} + // Describes the state of the operation. enum OperationState { // Unspecified. @@ -191,14 +201,3 @@ enum OperationState { // 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/FirestoreProto.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java index 5d3bede23a76..62c2bfa0433a 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java @@ -136,177 +136,180 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google/firestore/v1/query.proto\032\037google/" + "firestore/v1/write.proto\032\033google/protobu" + "f/empty.proto\032\037google/protobuf/timestamp" - + ".proto\032\027google/rpc/status.proto\"\263\001\n\022GetD" - + "ocumentRequest\022\014\n\004name\030\001 \001(\t\022/\n\004mask\030\002 \001" - + "(\0132!.google.firestore.v1.DocumentMask\022\025\n" - + "\013transaction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132" - + "\032.google.protobuf.TimestampH\000B\026\n\024consist" - + "ency_selector\"\235\002\n\024ListDocumentsRequest\022\016" - + "\n\006parent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n" - + "\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010" - + "order_by\030\006 \001(\t\022/\n\004mask\030\007 \001(\0132!.google.fi" - + "restore.v1.DocumentMask\022\025\n\013transaction\030\010" - + " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto" - + "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n" - + "\024consistency_selector\"b\n\025ListDocumentsRe" - + "sponse\0220\n\tdocuments\030\001 \003(\0132\035.google.fires" - + "tore.v1.Document\022\027\n\017next_page_token\030\002 \001(" - + "\t\"\265\001\n\025CreateDocumentRequest\022\016\n\006parent\030\001 " - + "\001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013document_i" - + "d\030\003 \001(\t\022/\n\010document\030\004 \001(\0132\035.google.fires" - + "tore.v1.Document\022/\n\004mask\030\005 \001(\0132!.google." - + "firestore.v1.DocumentMask\"\356\001\n\025UpdateDocu" - + "mentRequest\022/\n\010document\030\001 \001(\0132\035.google.f" - + "irestore.v1.Document\0226\n\013update_mask\030\002 \001(" - + "\0132!.google.firestore.v1.DocumentMask\022/\n\004" - + "mask\030\003 \001(\0132!.google.firestore.v1.Documen" - + "tMask\022;\n\020current_document\030\004 \001(\0132!.google" - + ".firestore.v1.Precondition\"b\n\025DeleteDocu" - + "mentRequest\022\014\n\004name\030\001 \001(\t\022;\n\020current_doc" - + "ument\030\002 \001(\0132!.google.firestore.v1.Precon" - + "dition\"\224\002\n\030BatchGetDocumentsRequest\022\020\n\010d" - + "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\022/\n\004mask" - + "\030\003 \001(\0132!.google.firestore.v1.DocumentMas" - + "k\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new_transact" - + "ion\030\005 \001(\0132\'.google.firestore.v1.Transact" - + "ionOptionsH\000\022/\n\tread_time\030\007 \001(\0132\032.google" - + ".protobuf.TimestampH\000B\026\n\024consistency_sel" - + "ector\"\254\001\n\031BatchGetDocumentsResponse\022.\n\005f" - + "ound\030\001 \001(\0132\035.google.firestore.v1.Documen" - + "tH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transaction\030\003 " - + "\001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf" - + ".TimestampB\010\n\006result\"e\n\027BeginTransaction" - + "Request\022\020\n\010database\030\001 \001(\t\0228\n\007options\030\002 \001" - + "(\0132\'.google.firestore.v1.TransactionOpti" - + "ons\"/\n\030BeginTransactionResponse\022\023\n\013trans" - + "action\030\001 \001(\014\"b\n\rCommitRequest\022\020\n\010databas" - + "e\030\001 \001(\t\022*\n\006writes\030\002 \003(\0132\032.google.firesto" - + "re.v1.Write\022\023\n\013transaction\030\003 \001(\014\"z\n\016Comm" - + "itResponse\0227\n\rwrite_results\030\001 \003(\0132 .goog" - + "le.firestore.v1.WriteResult\022/\n\013commit_ti" - + "me\030\002 \001(\0132\032.google.protobuf.Timestamp\"8\n\017" - + "RollbackRequest\022\020\n\010database\030\001 \001(\t\022\023\n\013tra" - + "nsaction\030\002 \001(\014\"\225\002\n\017RunQueryRequest\022\016\n\006pa" - + "rent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\0132$.g" - + "oogle.firestore.v1.StructuredQueryH\000\022\025\n\013" - + "transaction\030\005 \001(\014H\001\022B\n\017new_transaction\030\006" - + " \001(\0132\'.google.firestore.v1.TransactionOp" - + "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot" - + "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis" - + "tency_selector\"\240\001\n\020RunQueryResponse\022\023\n\013t" - + "ransaction\030\002 \001(\014\022/\n\010document\030\001 \001(\0132\035.goo" - + "gle.firestore.v1.Document\022-\n\tread_time\030\003" - + " \001(\0132\032.google.protobuf.Timestamp\022\027\n\017skip" - + "ped_results\030\004 \001(\005\"\343\001\n\014WriteRequest\022\020\n\010da" - + "tabase\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022*\n\006write" - + "s\030\003 \003(\0132\032.google.firestore.v1.Write\022\024\n\014s" - + "tream_token\030\004 \001(\014\022=\n\006labels\030\005 \003(\0132-.goog" - + "le.firestore.v1.WriteRequest.LabelsEntry" - + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\001\"\242\001\n\rWriteResponse\022\021\n\tstream_id\030\001" - + " \001(\t\022\024\n\014stream_token\030\002 \001(\014\0227\n\rwrite_resu" - + "lts\030\003 \003(\0132 .google.firestore.v1.WriteRes" - + "ult\022/\n\013commit_time\030\004 \001(\0132\032.google.protob" - + "uf.Timestamp\"\355\001\n\rListenRequest\022\020\n\010databa" - + "se\030\001 \001(\t\0221\n\nadd_target\030\002 \001(\0132\033.google.fi" - + "restore.v1.TargetH\000\022\027\n\rremove_target\030\003 \001" - + "(\005H\000\022>\n\006labels\030\004 \003(\0132..google.firestore." - + "v1.ListenRequest.LabelsEntry\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rt" - + "arget_change\"\325\002\n\016ListenResponse\022:\n\rtarge" - + "t_change\030\002 \001(\0132!.google.firestore.v1.Tar" - + "getChangeH\000\022>\n\017document_change\030\003 \001(\0132#.g" - + "oogle.firestore.v1.DocumentChangeH\000\022>\n\017d" - + "ocument_delete\030\004 \001(\0132#.google.firestore." - + "v1.DocumentDeleteH\000\022>\n\017document_remove\030\006" - + " \001(\0132#.google.firestore.v1.DocumentRemov" - + "eH\000\0226\n\006filter\030\005 \001(\0132$.google.firestore.v" - + "1.ExistenceFilterH\000B\017\n\rresponse_type\"\241\003\n" - + "\006Target\0228\n\005query\030\002 \001(\0132\'.google.firestor" - + "e.v1.Target.QueryTargetH\000\022@\n\tdocuments\030\003" - + " \001(\0132+.google.firestore.v1.Target.Docume" - + "ntsTargetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tr" - + "ead_time\030\013 \001(\0132\032.google.protobuf.Timesta" - + "mpH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n" - + "\017DocumentsTarget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013Q" - + "ueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020structured" - + "_query\030\002 \001(\0132$.google.firestore.v1.Struc" - + "turedQueryH\000B\014\n\nquery_typeB\r\n\013target_typ" - + "eB\r\n\013resume_type\"\252\002\n\014TargetChange\022N\n\022tar" - + "get_change_type\030\001 \001(\01622.google.firestore" - + ".v1.TargetChange.TargetChangeType\022\022\n\ntar" - + "get_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rp" - + "c.Status\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_t" - + "ime\030\006 \001(\0132\032.google.protobuf.Timestamp\"N\n" - + "\020TargetChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020" - + "\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n" - + "\030ListCollectionIdsRequest\022\016\n\006parent\030\001 \001(" - + "\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\"L\n\031ListCollectionIdsResponse\022\026\n\016collect" - + "ion_ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\204" - + "\022\n\tFirestore\022\217\001\n\013GetDocument\022\'.google.fi" - + "restore.v1.GetDocumentRequest\032\035.google.f" - + "irestore.v1.Document\"8\202\323\344\223\0022\0220/v1/{name=" - + "projects/*/databases/*/documents/*/**}\022\262" - + "\001\n\rListDocuments\022).google.firestore.v1.L" - + "istDocumentsRequest\032*.google.firestore.v" - + "1.ListDocumentsResponse\"J\202\323\344\223\002D\022B/v1/{pa" - + "rent=projects/*/databases/*/documents/*/" - + "**}/{collection_id}\022\257\001\n\016CreateDocument\022*" - + ".google.firestore.v1.CreateDocumentReque" - + "st\032\035.google.firestore.v1.Document\"R\202\323\344\223\002" - + "L\"@/v1/{parent=projects/*/databases/*/do" - + "cuments/**}/{collection_id}:\010document\022\250\001" - + "\n\016UpdateDocument\022*.google.firestore.v1.U" - + "pdateDocumentRequest\032\035.google.firestore." - + "v1.Document\"K\202\323\344\223\002E29/v1/{document.name=" - + "projects/*/databases/*/documents/*/**}:\010" - + "document\022\216\001\n\016DeleteDocument\022*.google.fir" - + "estore.v1.DeleteDocumentRequest\032\026.google" - + ".protobuf.Empty\"8\202\323\344\223\0022*0/v1/{name=proje" - + "cts/*/databases/*/documents/*/**}\022\271\001\n\021Ba" - + "tchGetDocuments\022-.google.firestore.v1.Ba" - + "tchGetDocumentsRequest\032..google.firestor" - + "e.v1.BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8" - + "/v1/{database=projects/*/databases/*}/do" - + "cuments:batchGet:\001*0\001\022\274\001\n\020BeginTransacti" - + "on\022,.google.firestore.v1.BeginTransactio" - + "nRequest\032-.google.firestore.v1.BeginTran" - + "sactionResponse\"K\202\323\344\223\002E\"@/v1/{database=p" - + "rojects/*/databases/*}/documents:beginTr" - + "ansaction:\001*\022\224\001\n\006Commit\022\".google.firesto" - + "re.v1.CommitRequest\032#.google.firestore.v" - + "1.CommitResponse\"A\202\323\344\223\002;\"6/v1/{database=" - + "projects/*/databases/*}/documents:commit" - + ":\001*\022\215\001\n\010Rollback\022$.google.firestore.v1.R" - + "ollbackRequest\032\026.google.protobuf.Empty\"C" - + "\202\323\344\223\002=\"8/v1/{database=projects/*/databas" - + "es/*}/documents:rollback:\001*\022\337\001\n\010RunQuery" - + "\022$.google.firestore.v1.RunQueryRequest\032%" - + ".google.firestore.v1.RunQueryResponse\"\203\001" - + "\202\323\344\223\002}\"6/v1/{parent=projects/*/databases" - + "/*/documents}:runQuery:\001*Z@\";/v1/{parent" - + "=projects/*/databases/*/documents/*/**}:" - + "runQuery:\001*0\001\022\224\001\n\005Write\022!.google.firesto" - + "re.v1.WriteRequest\032\".google.firestore.v1" - + ".WriteResponse\"@\202\323\344\223\002:\"5/v1/{database=pr" - + "ojects/*/databases/*}/documents:write:\001*" - + "(\0010\001\022\230\001\n\006Listen\022\".google.firestore.v1.Li" - + "stenRequest\032#.google.firestore.v1.Listen" - + "Response\"A\202\323\344\223\002;\"6/v1/{database=projects" - + "/*/databases/*}/documents:listen:\001*(\0010\001\022" - + "\213\002\n\021ListCollectionIds\022-.google.firestore" - + ".v1.ListCollectionIdsRequest\032..google.fi" - + "restore.v1.ListCollectionIdsResponse\"\226\001\202" - + "\323\344\223\002\217\001\"?/v1/{parent=projects/*/databases" - + "/*/documents}:listCollectionIds:\001*ZI\"D/v" - + "1/{parent=projects/*/databases/*/documen" - + "ts/*/**}:listCollectionIds:\001*B\250\001\n\027com.go" - + "ogle.firestore.v1B\016FirestoreProtoP\001Z\n\006labels\030" + + "\004 \003(\0132..google.firestore.v1.ListenReques" + + "t.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_change\"\325\002" + + "\n\016ListenResponse\022:\n\rtarget_change\030\002 \001(\0132" + + "!.google.firestore.v1.TargetChangeH\000\022>\n\017" + + "document_change\030\003 \001(\0132#.google.firestore" + + ".v1.DocumentChangeH\000\022>\n\017document_delete\030" + + "\004 \001(\0132#.google.firestore.v1.DocumentDele" + + "teH\000\022>\n\017document_remove\030\006 \001(\0132#.google.f" + + "irestore.v1.DocumentRemoveH\000\0226\n\006filter\030\005" + + " \001(\0132$.google.firestore.v1.ExistenceFilt" + + "erH\000B\017\n\rresponse_type\"\241\003\n\006Target\0228\n\005quer" + + "y\030\002 \001(\0132\'.google.firestore.v1.Target.Que" + + "ryTargetH\000\022@\n\tdocuments\030\003 \001(\0132+.google.f" + + "irestore.v1.Target.DocumentsTargetH\000\022\026\n\014" + + "resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132" + + "\032.google.protobuf.TimestampH\001\022\021\n\ttarget_" + + "id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsTarge" + + "t\022\021\n\tdocuments\030\002 \003(\t\032m\n\013QueryTarget\022\016\n\006p" + + "arent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\0132$." + + "google.firestore.v1.StructuredQueryH\000B\014\n" + + "\nquery_typeB\r\n\013target_typeB\r\n\013resume_typ" + + "e\"\252\002\n\014TargetChange\022N\n\022target_change_type" + + "\030\001 \001(\01622.google.firestore.v1.TargetChang" + + "e.TargetChangeType\022\022\n\ntarget_ids\030\002 \003(\005\022!" + + "\n\005cause\030\003 \001(\0132\022.google.rpc.Status\022\024\n\014res" + + "ume_token\030\004 \001(\014\022-\n\tread_time\030\006 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\"N\n\020TargetChangeTy" + + "pe\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013" + + "\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n\030ListCollection" + + "IdsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031ListCollect" + + "ionIdsResponse\022\026\n\016collection_ids\030\001 \003(\t\022\027" + + "\n\017next_page_token\030\002 \001(\t2\374\022\n\tFirestore\022\217\001" + + "\n\013GetDocument\022\'.google.firestore.v1.GetD" + + "ocumentRequest\032\035.google.firestore.v1.Doc" + + "ument\"8\202\323\344\223\0022\0220/v1/{name=projects/*/data" + + "bases/*/documents/*/**}\022\262\001\n\rListDocument" + + "s\022).google.firestore.v1.ListDocumentsReq" + + "uest\032*.google.firestore.v1.ListDocuments" + + "Response\"J\202\323\344\223\002D\022B/v1/{parent=projects/*" + + "/databases/*/documents/*/**}/{collection" + + "_id}\022\257\001\n\016CreateDocument\022*.google.firesto" + + "re.v1.CreateDocumentRequest\032\035.google.fir" + + "estore.v1.Document\"R\202\323\344\223\002L\"@/v1/{parent=" + + "projects/*/databases/*/documents/**}/{co" + + "llection_id}:\010document\022\250\001\n\016UpdateDocumen" + + "t\022*.google.firestore.v1.UpdateDocumentRe" + + "quest\032\035.google.firestore.v1.Document\"K\202\323" + + "\344\223\002E29/v1/{document.name=projects/*/data" + + "bases/*/documents/*/**}:\010document\022\216\001\n\016De" + + "leteDocument\022*.google.firestore.v1.Delet" + + "eDocumentRequest\032\026.google.protobuf.Empty" + + "\"8\202\323\344\223\0022*0/v1/{name=projects/*/databases" + + "/*/documents/*/**}\022\271\001\n\021BatchGetDocuments" + + "\022-.google.firestore.v1.BatchGetDocuments" + + "Request\032..google.firestore.v1.BatchGetDo" + + "cumentsResponse\"C\202\323\344\223\002=\"8/v1/{database=p" + + "rojects/*/databases/*}/documents:batchGe" + + "t:\001*0\001\022\274\001\n\020BeginTransaction\022,.google.fir" + + "estore.v1.BeginTransactionRequest\032-.goog" + + "le.firestore.v1.BeginTransactionResponse" + + "\"K\202\323\344\223\002E\"@/v1/{database=projects/*/datab" + + "ases/*}/documents:beginTransaction:\001*\022\224\001" + + "\n\006Commit\022\".google.firestore.v1.CommitReq" + + "uest\032#.google.firestore.v1.CommitRespons" + + "e\"A\202\323\344\223\002;\"6/v1/{database=projects/*/data" + + "bases/*}/documents:commit:\001*\022\215\001\n\010Rollbac" + + "k\022$.google.firestore.v1.RollbackRequest\032" + + "\026.google.protobuf.Empty\"C\202\323\344\223\002=\"8/v1/{da" + + "tabase=projects/*/databases/*}/documents" + + ":rollback:\001*\022\337\001\n\010RunQuery\022$.google.fires" + + "tore.v1.RunQueryRequest\032%.google.firesto" + + "re.v1.RunQueryResponse\"\203\001\202\323\344\223\002}\"6/v1/{pa" + + "rent=projects/*/databases/*/documents}:r" + + "unQuery:\001*Z@\";/v1/{parent=projects/*/dat" + + "abases/*/documents/*/**}:runQuery:\001*0\001\022\224" + + "\001\n\005Write\022!.google.firestore.v1.WriteRequ" + + "est\032\".google.firestore.v1.WriteResponse\"" + + "@\202\323\344\223\002:\"5/v1/{database=projects/*/databa" + + "ses/*}/documents:write:\001*(\0010\001\022\230\001\n\006Listen" + + "\022\".google.firestore.v1.ListenRequest\032#.g" + + "oogle.firestore.v1.ListenResponse\"A\202\323\344\223\002" + + ";\"6/v1/{database=projects/*/databases/*}" + + "/documents:listen:\001*(\0010\001\022\213\002\n\021ListCollect" + + "ionIds\022-.google.firestore.v1.ListCollect" + + "ionIdsRequest\032..google.firestore.v1.List" + + "CollectionIdsResponse\"\226\001\202\323\344\223\002\217\001\"?/v1/{pa" + + "rent=projects/*/databases/*/documents}:l" + + "istCollectionIds:\001*ZI\"D/v1/{parent=proje" + + "cts/*/databases/*/documents/*/**}:listCo" + + "llectionIds:\001*\032v\312A\030firestore.googleapis." + + "com\322AXhttps://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/" + + "auth/datastoreB\250\001\n\027com.google.firestore." + + "v1B\016FirestoreProtoP\001Z - * Test if an exprestion evaluates to Null. + * Test if an expression evaluates to Null. * IS_NULL = 3;
@@ -5545,7 +5545,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *- * Test if an exprestion evaluates to Null. + * Test if an expression evaluates to Null. ** *IS_NULL = 3;
@@ -6458,37 +6458,84 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstanceFor } } - 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 @@ -6496,7 +6543,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 { @@ -6515,11 +6562,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: @@ -6543,44 +6607,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; @@ -6597,8 +6707,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); } @@ -6609,8 +6723,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; @@ -6622,13 +6740,17 @@ 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; - if (!getFieldPath().equals(other.getFieldPath())) return false; + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField().equals(other.getField())) return false; + } + if (direction_ != other.direction_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6640,78 +6762,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 { @@ -6728,8 +6854,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); } @@ -6748,32 +6873,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.Builderimplements - // @@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(); } @@ -6790,7 +6915,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; } @@ -6798,17 +6929,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); } @@ -6816,10 +6947,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; } @@ -6861,20 +6997,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(); @@ -6891,12 +7029,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) { @@ -6906,190 +7043,349 @@ 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_; + 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(); - onChanged(); return this; } - /**string field_path = 2;
*/ - public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *+ * 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); } - checkByteStringIsUtf8(value); - fieldPath_ = value; - 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; + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + return this; } + /** + * + * + *+ * The field to order by. + *+ * + *.google.firestore.v1.StructuredQuery.FieldReference field = 1;
+ */ + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + 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.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Order) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Order) + private static final com.google.firestore.v1.StructuredQuery.Order DEFAULT_INSTANCE; - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.FieldReference) - } - - // @@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.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.ParserPARSER = - 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; } } - 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 @@ -7097,7 +7393,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 { @@ -7116,31 +7412,14 @@ private Order( case 0: done = true; break; - case 10: + case 18: { - 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(); - } + java.lang.String s = input.readStringRequireUtf8(); + fieldPath_ = s; break; } - case 16: - { - int rawValue = input.readEnum(); - - direction_ = rawValue; - break; - } - default: + default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; @@ -7161,90 +7440,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; @@ -7261,12 +7494,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); } @@ -7277,12 +7506,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; @@ -7294,17 +7519,13 @@ 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; - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField().equals(other.getField())) return false; - } - if (direction_ != other.direction_) return false; + if (!getFieldPath().equals(other.getFieldPath())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7316,82 +7537,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 { @@ -7408,7 +7625,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); } @@ -7427,32 +7645,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.Builderimplements - // @@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(); } @@ -7469,13 +7687,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; } @@ -7483,17 +7695,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); } @@ -7501,15 +7713,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; } @@ -7551,22 +7758,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(); @@ -7583,11 +7788,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) { @@ -7597,262 +7803,56 @@ public Builder mergeFrom( return this; } - private com.google.firestore.v1.StructuredQuery.FieldReference field_; - 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_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - * - * - *- * 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(); + 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 { - fieldBuilder_.setMessage(value); + return (java.lang.String) 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()); - } - - 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(); + /**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_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - - 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 setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - return this; - } - /** - * - * - *- * The field to order by. - *- * - *.google.firestore.v1.StructuredQuery.FieldReference field = 1;
- */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - + fieldPath_ = value; 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_; + return this; } + /**string field_path = 2;
*/ + public Builder clearFieldPath() { - 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; + fieldPath_ = getDefaultInstance().getFieldPath(); 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) { + /**string field_path = 2;
*/ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(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; + fieldPath_ = value; onChanged(); return this; } @@ -7869,42 +7869,42 @@ 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.ParserPARSER = - 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; } } 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 e2885422e677..35bdb8892a29 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 @@ -2221,12 +2221,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * * - * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
@@ -3413,12 +3409,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
@@ -3430,12 +3422,8 @@ public int getTargetId() { * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
@@ -3450,12 +3438,8 @@ public Builder setTargetId(int value) { * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java index 67d996e2b065..2f7adbd3b533 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java @@ -401,10 +401,7 @@ public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -418,10 +415,7 @@ public java.util.ListgetTargetIdsList() { * * The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -435,10 +429,7 @@ public int getTargetIdsCount() { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1091,10 +1082,7 @@ private void ensureTargetIdsIsMutable() { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1110,10 +1098,7 @@ public java.util.ListgetTargetIdsList() { * * The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1127,10 +1112,7 @@ public int getTargetIdsCount() { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1144,10 +1126,7 @@ public int getTargetIds(int index) { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1164,10 +1143,7 @@ public Builder setTargetIds(int index, int value) { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1184,10 +1160,7 @@ public Builder addTargetIds(int value) { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1204,10 +1177,7 @@ public Builder addAllTargetIds(java.lang.Iterable extends java.lang.Integer> v ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java index 6719a99062cb..d42b6f33e2e9 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChangeOrBuilder.java @@ -35,10 +35,7 @@ public interface TargetChangeOrBuilder ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -50,10 +47,7 @@ public interface TargetChangeOrBuilder ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -65,10 +59,7 @@ public interface TargetChangeOrBuilder ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
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 806e74d3b237..71ec2656acb0 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 @@ -120,12 +120,8 @@ public interface TargetOrBuilder * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
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 59c62997ad0d..8e2ef27ff28a 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 @@ -28,7 +28,6 @@ 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. 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 d3d9c11c79cf..9110b4ff60da 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 @@ -30,7 +30,6 @@ 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 5dc9667e2ca2..2fb25deb7b54 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 @@ -25,6 +25,7 @@ import "google/firestore/v1/write.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -33,6 +34,7 @@ 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. @@ -52,6 +54,11 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1"; // committed. Any read with an equal or greater `read_time` is guaranteed // to see the effects of the transaction. service Firestore { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Gets a single document. rpc GetDocument(GetDocumentRequest) returns (Document) { option (google.api.http) = { @@ -654,14 +661,8 @@ message Target { google.protobuf.Timestamp read_time = 11; } - // A client provided target ID. - // - // If not set, the server will assign an ID for the target. - // - // Used for resuming a target without changing IDs. The IDs can either be - // client-assigned or be server-assigned in a previous stream. All targets - // with client provided IDs must be added before adding a target that needs - // a server-assigned id. + // The target ID that identifies the target on the stream. Must be a positive + // number and non-zero. int32 target_id = 5; // If the target should be removed once it is current and consistent. @@ -706,11 +707,7 @@ message TargetChange { // // If empty, the change applies to all targets. // - // For `target_change_type=ADD`, the order of the target IDs matches the order - // of the requests to add the targets. This allows clients to unambiguously - // associate server-assigned target IDs with added targets. - // - // For other states, the order of the target IDs is not defined. + // The order of the target IDs is not defined. repeated int32 target_ids = 2; // The error that resulted in this change, if applicable. 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 48684c06079d..e2d7b836ff2d 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 @@ -29,7 +29,6 @@ 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`. @@ -115,6 +114,18 @@ message StructuredQuery { Value value = 3; } + // A sort direction. + enum Direction { + // Unspecified. + DIRECTION_UNSPECIFIED = 0; + + // Ascending. + ASCENDING = 1; + + // Descending. + DESCENDING = 2; + } + // A filter with a single operand. message UnaryFilter { // A unary operator. @@ -125,7 +136,7 @@ message StructuredQuery { // Test if a field is equal to NaN. IS_NAN = 2; - // Test if an exprestion evaluates to Null. + // Test if an expression evaluates to Null. IS_NULL = 3; } @@ -139,11 +150,6 @@ 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. @@ -153,6 +159,11 @@ 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. @@ -162,18 +173,6 @@ message StructuredQuery { repeated FieldReference fields = 2; } - // A sort direction. - enum Direction { - // Unspecified. - DIRECTION_UNSPECIFIED = 0; - - // Ascending. - ASCENDING = 1; - - // Descending. - DESCENDING = 2; - } - // The projection to return. Projection select = 1; 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 4ab5d833e3b9..51d923918014 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 @@ -30,7 +30,6 @@ 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. diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/FirestoreProto.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/FirestoreProto.java index 6f55b85e6288..75deea9093e5 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/FirestoreProto.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/FirestoreProto.java @@ -137,186 +137,190 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eta1/query.proto\032$google/firestore/v1bet" + "a1/write.proto\032\033google/protobuf/empty.pr" + "oto\032\037google/protobuf/timestamp.proto\032\027go" - + "ogle/rpc/status.proto\"\270\001\n\022GetDocumentReq" - + "uest\022\014\n\004name\030\001 \001(\t\0224\n\004mask\030\002 \001(\0132&.googl" - + "e.firestore.v1beta1.DocumentMask\022\025\n\013tran" - + "saction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132\032.goo" - + "gle.protobuf.TimestampH\000B\026\n\024consistency_" - + "selector\"\242\002\n\024ListDocumentsRequest\022\016\n\006par" - + "ent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n\tpage" - + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010order" - + "_by\030\006 \001(\t\0224\n\004mask\030\007 \001(\0132&.google.firesto" - + "re.v1beta1.DocumentMask\022\025\n\013transaction\030\010" - + " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto" - + "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n" - + "\024consistency_selector\"g\n\025ListDocumentsRe" - + "sponse\0225\n\tdocuments\030\001 \003(\0132\".google.fires" - + "tore.v1beta1.Document\022\027\n\017next_page_token" - + "\030\002 \001(\t\"\277\001\n\025CreateDocumentRequest\022\016\n\006pare" - + "nt\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013docum" - + "ent_id\030\003 \001(\t\0224\n\010document\030\004 \001(\0132\".google." - + "firestore.v1beta1.Document\0224\n\004mask\030\005 \001(\013" - + "2&.google.firestore.v1beta1.DocumentMask" - + "\"\202\002\n\025UpdateDocumentRequest\0224\n\010document\030\001" - + " \001(\0132\".google.firestore.v1beta1.Document" - + "\022;\n\013update_mask\030\002 \001(\0132&.google.firestore" - + ".v1beta1.DocumentMask\0224\n\004mask\030\003 \001(\0132&.go" - + "ogle.firestore.v1beta1.DocumentMask\022@\n\020c" - + "urrent_document\030\004 \001(\0132&.google.firestore" - + ".v1beta1.Precondition\"g\n\025DeleteDocumentR" - + "equest\022\014\n\004name\030\001 \001(\t\022@\n\020current_document" - + "\030\002 \001(\0132&.google.firestore.v1beta1.Precon" - + "dition\"\236\002\n\030BatchGetDocumentsRequest\022\020\n\010d" - + "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\0224\n\004mask" - + "\030\003 \001(\0132&.google.firestore.v1beta1.Docume" - + "ntMask\022\025\n\013transaction\030\004 \001(\014H\000\022G\n\017new_tra" - + "nsaction\030\005 \001(\0132,.google.firestore.v1beta" - + "1.TransactionOptionsH\000\022/\n\tread_time\030\007 \001(" - + "\0132\032.google.protobuf.TimestampH\000B\026\n\024consi" - + "stency_selector\"\261\001\n\031BatchGetDocumentsRes" - + "ponse\0223\n\005found\030\001 \001(\0132\".google.firestore." - + "v1beta1.DocumentH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n" - + "\013transaction\030\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032." - + "google.protobuf.TimestampB\010\n\006result\"j\n\027B" - + "eginTransactionRequest\022\020\n\010database\030\001 \001(\t" - + "\022=\n\007options\030\002 \001(\0132,.google.firestore.v1b" - + "eta1.TransactionOptions\"/\n\030BeginTransact" - + "ionResponse\022\023\n\013transaction\030\001 \001(\014\"g\n\rComm" - + "itRequest\022\020\n\010database\030\001 \001(\t\022/\n\006writes\030\002 " - + "\003(\0132\037.google.firestore.v1beta1.Write\022\023\n\013" - + "transaction\030\003 \001(\014\"\177\n\016CommitResponse\022<\n\rw" - + "rite_results\030\001 \003(\0132%.google.firestore.v1" - + "beta1.WriteResult\022/\n\013commit_time\030\002 \001(\0132\032" - + ".google.protobuf.Timestamp\"8\n\017RollbackRe" - + "quest\022\020\n\010database\030\001 \001(\t\022\023\n\013transaction\030\002" - + " \001(\014\"\237\002\n\017RunQueryRequest\022\016\n\006parent\030\001 \001(\t" - + "\022E\n\020structured_query\030\002 \001(\0132).google.fire" - + "store.v1beta1.StructuredQueryH\000\022\025\n\013trans" - + "action\030\005 \001(\014H\001\022G\n\017new_transaction\030\006 \001(\0132" + + "ogle/rpc/status.proto\032\027google/api/client" + + ".proto\"\270\001\n\022GetDocumentRequest\022\014\n\004name\030\001 " + + "\001(\t\0224\n\004mask\030\002 \001(\0132&.google.firestore.v1b" + + "eta1.DocumentMask\022\025\n\013transaction\030\003 \001(\014H\000" + + "\022/\n\tread_time\030\005 \001(\0132\032.google.protobuf.Ti" + + "mestampH\000B\026\n\024consistency_selector\"\242\002\n\024Li" + + "stDocumentsRequest\022\016\n\006parent\030\001 \001(\t\022\025\n\rco" + + "llection_id\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\n" + + "page_token\030\004 \001(\t\022\020\n\010order_by\030\006 \001(\t\0224\n\004ma" + + "sk\030\007 \001(\0132&.google.firestore.v1beta1.Docu" + + "mentMask\022\025\n\013transaction\030\010 \001(\014H\000\022/\n\tread_" + + "time\030\n \001(\0132\032.google.protobuf.TimestampH\000" + + "\022\024\n\014show_missing\030\014 \001(\010B\026\n\024consistency_se" + + "lector\"g\n\025ListDocumentsResponse\0225\n\tdocum" + + "ents\030\001 \003(\0132\".google.firestore.v1beta1.Do" + + "cument\022\027\n\017next_page_token\030\002 \001(\t\"\277\001\n\025Crea" + + "teDocumentRequest\022\016\n\006parent\030\001 \001(\t\022\025\n\rcol" + + "lection_id\030\002 \001(\t\022\023\n\013document_id\030\003 \001(\t\0224\n" + + "\010document\030\004 \001(\0132\".google.firestore.v1bet" + + "a1.Document\0224\n\004mask\030\005 \001(\0132&.google.fires" + + "tore.v1beta1.DocumentMask\"\202\002\n\025UpdateDocu" + + "mentRequest\0224\n\010document\030\001 \001(\0132\".google.f" + + "irestore.v1beta1.Document\022;\n\013update_mask" + + "\030\002 \001(\0132&.google.firestore.v1beta1.Docume" + + "ntMask\0224\n\004mask\030\003 \001(\0132&.google.firestore." + + "v1beta1.DocumentMask\022@\n\020current_document" + + "\030\004 \001(\0132&.google.firestore.v1beta1.Precon" + + "dition\"g\n\025DeleteDocumentRequest\022\014\n\004name\030" + + "\001 \001(\t\022@\n\020current_document\030\002 \001(\0132&.google" + + ".firestore.v1beta1.Precondition\"\236\002\n\030Batc" + + "hGetDocumentsRequest\022\020\n\010database\030\001 \001(\t\022\021" + + "\n\tdocuments\030\002 \003(\t\0224\n\004mask\030\003 \001(\0132&.google" + + ".firestore.v1beta1.DocumentMask\022\025\n\013trans" + + "action\030\004 \001(\014H\000\022G\n\017new_transaction\030\005 \001(\0132" + ",.google.firestore.v1beta1.TransactionOp" - + "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot" - + "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis" - + "tency_selector\"\245\001\n\020RunQueryResponse\022\023\n\013t" - + "ransaction\030\002 \001(\014\0224\n\010document\030\001 \001(\0132\".goo" - + "gle.firestore.v1beta1.Document\022-\n\tread_t" - + "ime\030\003 \001(\0132\032.google.protobuf.Timestamp\022\027\n" - + "\017skipped_results\030\004 \001(\005\"\355\001\n\014WriteRequest\022" - + "\020\n\010database\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022/\n\006" - + "writes\030\003 \003(\0132\037.google.firestore.v1beta1." - + "Write\022\024\n\014stream_token\030\004 \001(\014\022B\n\006labels\030\005 " - + "\003(\01322.google.firestore.v1beta1.WriteRequ" - + "est.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 " - + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\247\001\n\rWriteResponse" - + "\022\021\n\tstream_id\030\001 \001(\t\022\024\n\014stream_token\030\002 \001(" - + "\014\022<\n\rwrite_results\030\003 \003(\0132%.google.firest" - + "ore.v1beta1.WriteResult\022/\n\013commit_time\030\004" - + " \001(\0132\032.google.protobuf.Timestamp\"\367\001\n\rLis" - + "tenRequest\022\020\n\010database\030\001 \001(\t\0226\n\nadd_targ" - + "et\030\002 \001(\0132 .google.firestore.v1beta1.Targ" - + "etH\000\022\027\n\rremove_target\030\003 \001(\005H\000\022C\n\006labels\030" - + "\004 \003(\01323.google.firestore.v1beta1.ListenR" - + "equest.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key" - + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_chan" - + "ge\"\356\002\n\016ListenResponse\022?\n\rtarget_change\030\002" - + " \001(\0132&.google.firestore.v1beta1.TargetCh" - + "angeH\000\022C\n\017document_change\030\003 \001(\0132(.google" - + ".firestore.v1beta1.DocumentChangeH\000\022C\n\017d" - + "ocument_delete\030\004 \001(\0132(.google.firestore." - + "v1beta1.DocumentDeleteH\000\022C\n\017document_rem" - + "ove\030\006 \001(\0132(.google.firestore.v1beta1.Doc" - + "umentRemoveH\000\022;\n\006filter\030\005 \001(\0132).google.f" - + "irestore.v1beta1.ExistenceFilterH\000B\017\n\rre" - + "sponse_type\"\260\003\n\006Target\022=\n\005query\030\002 \001(\0132,." - + "google.firestore.v1beta1.Target.QueryTar" - + "getH\000\022E\n\tdocuments\030\003 \001(\01320.google.firest" - + "ore.v1beta1.Target.DocumentsTargetH\000\022\026\n\014" - + "resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132" - + "\032.google.protobuf.TimestampH\001\022\021\n\ttarget_" - + "id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsTarge" - + "t\022\021\n\tdocuments\030\002 \003(\t\032r\n\013QueryTarget\022\016\n\006p" - + "arent\030\001 \001(\t\022E\n\020structured_query\030\002 \001(\0132)." - + "google.firestore.v1beta1.StructuredQuery" - + "H\000B\014\n\nquery_typeB\r\n\013target_typeB\r\n\013resum" - + "e_type\"\257\002\n\014TargetChange\022S\n\022target_change" - + "_type\030\001 \001(\01627.google.firestore.v1beta1.T" - + "argetChange.TargetChangeType\022\022\n\ntarget_i" - + "ds\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.Sta" - + "tus\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_time\030\006" - + " \001(\0132\032.google.protobuf.Timestamp\"N\n\020Targ" - + "etChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006" - + "REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n\030List" - + "CollectionIdsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\t" - + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031L" - + "istCollectionIdsResponse\022\026\n\016collection_i" - + "ds\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\310\023\n\tFi" - + "restore\022\236\001\n\013GetDocument\022,.google.firesto" - + "re.v1beta1.GetDocumentRequest\032\".google.f" - + "irestore.v1beta1.Document\"=\202\323\344\223\0027\0225/v1be" - + "ta1/{name=projects/*/databases/*/documen" - + "ts/*/**}\022\301\001\n\rListDocuments\022..google.fire" - + "store.v1beta1.ListDocumentsRequest\032/.goo" - + "gle.firestore.v1beta1.ListDocumentsRespo" - + "nse\"O\202\323\344\223\002I\022G/v1beta1/{parent=projects/*" - + "/databases/*/documents/*/**}/{collection" - + "_id}\022\276\001\n\016CreateDocument\022/.google.firesto" - + "re.v1beta1.CreateDocumentRequest\032\".googl" - + "e.firestore.v1beta1.Document\"W\202\323\344\223\002Q\"E/v" + + "tionsH\000\022/\n\tread_time\030\007 \001(\0132\032.google.prot" + + "obuf.TimestampH\000B\026\n\024consistency_selector" + + "\"\261\001\n\031BatchGetDocumentsResponse\0223\n\005found\030" + + "\001 \001(\0132\".google.firestore.v1beta1.Documen" + + "tH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transaction\030\003 " + + "\001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf" + + ".TimestampB\010\n\006result\"j\n\027BeginTransaction" + + "Request\022\020\n\010database\030\001 \001(\t\022=\n\007options\030\002 \001" + + "(\0132,.google.firestore.v1beta1.Transactio" + + "nOptions\"/\n\030BeginTransactionResponse\022\023\n\013" + + "transaction\030\001 \001(\014\"g\n\rCommitRequest\022\020\n\010da" + + "tabase\030\001 \001(\t\022/\n\006writes\030\002 \003(\0132\037.google.fi" + + "restore.v1beta1.Write\022\023\n\013transaction\030\003 \001" + + "(\014\"\177\n\016CommitResponse\022<\n\rwrite_results\030\001 " + + "\003(\0132%.google.firestore.v1beta1.WriteResu" + + "lt\022/\n\013commit_time\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\"8\n\017RollbackRequest\022\020\n\010databa" + + "se\030\001 \001(\t\022\023\n\013transaction\030\002 \001(\014\"\237\002\n\017RunQue" + + "ryRequest\022\016\n\006parent\030\001 \001(\t\022E\n\020structured_" + + "query\030\002 \001(\0132).google.firestore.v1beta1.S" + + "tructuredQueryH\000\022\025\n\013transaction\030\005 \001(\014H\001\022" + + "G\n\017new_transaction\030\006 \001(\0132,.google.firest" + + "ore.v1beta1.TransactionOptionsH\001\022/\n\tread" + + "_time\030\007 \001(\0132\032.google.protobuf.TimestampH" + + "\001B\014\n\nquery_typeB\026\n\024consistency_selector\"" + + "\245\001\n\020RunQueryResponse\022\023\n\013transaction\030\002 \001(" + + "\014\0224\n\010document\030\001 \001(\0132\".google.firestore.v" + + "1beta1.Document\022-\n\tread_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022\027\n\017skipped_result" + + "s\030\004 \001(\005\"\355\001\n\014WriteRequest\022\020\n\010database\030\001 \001" + + "(\t\022\021\n\tstream_id\030\002 \001(\t\022/\n\006writes\030\003 \003(\0132\037." + + "google.firestore.v1beta1.Write\022\024\n\014stream" + + "_token\030\004 \001(\014\022B\n\006labels\030\005 \003(\01322.google.fi" + + "restore.v1beta1.WriteRequest.LabelsEntry" + + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\"\247\001\n\rWriteResponse\022\021\n\tstream_id\030\001" + + " \001(\t\022\024\n\014stream_token\030\002 \001(\014\022<\n\rwrite_resu" + + "lts\030\003 \003(\0132%.google.firestore.v1beta1.Wri" + + "teResult\022/\n\013commit_time\030\004 \001(\0132\032.google.p" + + "rotobuf.Timestamp\"\367\001\n\rListenRequest\022\020\n\010d" + + "atabase\030\001 \001(\t\0226\n\nadd_target\030\002 \001(\0132 .goog" + + "le.firestore.v1beta1.TargetH\000\022\027\n\rremove_" + + "target\030\003 \001(\005H\000\022C\n\006labels\030\004 \003(\01323.google." + + "firestore.v1beta1.ListenRequest.LabelsEn" + + "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001B\017\n\rtarget_change\"\356\002\n\016ListenRe" + + "sponse\022?\n\rtarget_change\030\002 \001(\0132&.google.f" + + "irestore.v1beta1.TargetChangeH\000\022C\n\017docum" + + "ent_change\030\003 \001(\0132(.google.firestore.v1be" + + "ta1.DocumentChangeH\000\022C\n\017document_delete\030" + + "\004 \001(\0132(.google.firestore.v1beta1.Documen" + + "tDeleteH\000\022C\n\017document_remove\030\006 \001(\0132(.goo" + + "gle.firestore.v1beta1.DocumentRemoveH\000\022;" + + "\n\006filter\030\005 \001(\0132).google.firestore.v1beta" + + "1.ExistenceFilterH\000B\017\n\rresponse_type\"\260\003\n" + + "\006Target\022=\n\005query\030\002 \001(\0132,.google.firestor" + + "e.v1beta1.Target.QueryTargetH\000\022E\n\tdocume" + + "nts\030\003 \001(\01320.google.firestore.v1beta1.Tar" + + "get.DocumentsTargetH\000\022\026\n\014resume_token\030\004 " + + "\001(\014H\001\022/\n\tread_time\030\013 \001(\0132\032.google.protob" + + "uf.TimestampH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004onc" + + "e\030\006 \001(\010\032$\n\017DocumentsTarget\022\021\n\tdocuments\030" + + "\002 \003(\t\032r\n\013QueryTarget\022\016\n\006parent\030\001 \001(\t\022E\n\020" + + "structured_query\030\002 \001(\0132).google.firestor" + + "e.v1beta1.StructuredQueryH\000B\014\n\nquery_typ" + + "eB\r\n\013target_typeB\r\n\013resume_type\"\257\002\n\014Targ" + + "etChange\022S\n\022target_change_type\030\001 \001(\01627.g" + + "oogle.firestore.v1beta1.TargetChange.Tar" + + "getChangeType\022\022\n\ntarget_ids\030\002 \003(\005\022!\n\005cau" + + "se\030\003 \001(\0132\022.google.rpc.Status\022\024\n\014resume_t" + + "oken\030\004 \001(\014\022-\n\tread_time\030\006 \001(\0132\032.google.p" + + "rotobuf.Timestamp\"N\n\020TargetChangeType\022\r\n" + + "\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007CUR" + + "RENT\020\003\022\t\n\005RESET\020\004\"Q\n\030ListCollectionIdsRe" + + "quest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\"L\n\031ListCollectionId" + + "sResponse\022\026\n\016collection_ids\030\001 \003(\t\022\027\n\017nex" + + "t_page_token\030\002 \001(\t2\300\024\n\tFirestore\022\236\001\n\013Get" + + "Document\022,.google.firestore.v1beta1.GetD" + + "ocumentRequest\032\".google.firestore.v1beta" + + "1.Document\"=\202\323\344\223\0027\0225/v1beta1/{name=proje" + + "cts/*/databases/*/documents/*/**}\022\301\001\n\rLi" + + "stDocuments\022..google.firestore.v1beta1.L" + + "istDocumentsRequest\032/.google.firestore.v" + + "1beta1.ListDocumentsResponse\"O\202\323\344\223\002I\022G/v" + "1beta1/{parent=projects/*/databases/*/do" - + "cuments/**}/{collection_id}:\010document\022\267\001" - + "\n\016UpdateDocument\022/.google.firestore.v1be" - + "ta1.UpdateDocumentRequest\032\".google.fires" - + "tore.v1beta1.Document\"P\202\323\344\223\002J2>/v1beta1/" - + "{document.name=projects/*/databases/*/do" - + "cuments/*/**}:\010document\022\230\001\n\016DeleteDocume" - + "nt\022/.google.firestore.v1beta1.DeleteDocu" - + "mentRequest\032\026.google.protobuf.Empty\"=\202\323\344" - + "\223\0027*5/v1beta1/{name=projects/*/databases" - + "/*/documents/*/**}\022\310\001\n\021BatchGetDocuments" - + "\0222.google.firestore.v1beta1.BatchGetDocu" - + "mentsRequest\0323.google.firestore.v1beta1." - + "BatchGetDocumentsResponse\"H\202\323\344\223\002B\"=/v1be" - + "ta1/{database=projects/*/databases/*}/do" - + "cuments:batchGet:\001*0\001\022\313\001\n\020BeginTransacti" - + "on\0221.google.firestore.v1beta1.BeginTrans" - + "actionRequest\0322.google.firestore.v1beta1" - + ".BeginTransactionResponse\"P\202\323\344\223\002J\"E/v1be" - + "ta1/{database=projects/*/databases/*}/do" - + "cuments:beginTransaction:\001*\022\243\001\n\006Commit\022\'" - + ".google.firestore.v1beta1.CommitRequest\032" - + "(.google.firestore.v1beta1.CommitRespons" - + "e\"F\202\323\344\223\002@\";/v1beta1/{database=projects/*" - + "/databases/*}/documents:commit:\001*\022\227\001\n\010Ro" - + "llback\022).google.firestore.v1beta1.Rollba" - + "ckRequest\032\026.google.protobuf.Empty\"H\202\323\344\223\002" - + "B\"=/v1beta1/{database=projects/*/databas" - + "es/*}/documents:rollback:\001*\022\364\001\n\010RunQuery" - + "\022).google.firestore.v1beta1.RunQueryRequ" - + "est\032*.google.firestore.v1beta1.RunQueryR" - + "esponse\"\216\001\202\323\344\223\002\207\001\";/v1beta1/{parent=proj" - + "ects/*/databases/*/documents}:runQuery:\001" - + "*ZE\"@/v1beta1/{parent=projects/*/databas" - + "es/*/documents/*/**}:runQuery:\001*0\001\022\243\001\n\005W" - + "rite\022&.google.firestore.v1beta1.WriteReq" - + "uest\032\'.google.firestore.v1beta1.WriteRes" - + "ponse\"E\202\323\344\223\002?\":/v1beta1/{database=projec" - + "ts/*/databases/*}/documents:write:\001*(\0010\001" - + "\022\247\001\n\006Listen\022\'.google.firestore.v1beta1.L" - + "istenRequest\032(.google.firestore.v1beta1." - + "ListenResponse\"F\202\323\344\223\002@\";/v1beta1/{databa" - + "se=projects/*/databases/*}/documents:lis" - + "ten:\001*(\0010\001\022\237\002\n\021ListCollectionIds\0222.googl" - + "e.firestore.v1beta1.ListCollectionIdsReq" - + "uest\0323.google.firestore.v1beta1.ListColl" - + "ectionIdsResponse\"\240\001\202\323\344\223\002\231\001\"D/v1beta1/{p" - + "arent=projects/*/databases/*/documents}:" - + "listCollectionIds:\001*ZN\"I/v1beta1/{parent" - + "=projects/*/databases/*/documents/*/**}:" - + "listCollectionIds:\001*B\274\001\n\034com.google.fire" - + "store.v1beta1B\016FirestoreProtoP\001ZAgoogle." - + "golang.org/genproto/googleapis/firestore" - + "/v1beta1;firestore\242\002\004GCFS\252\002\036Google.Cloud" - + ".Firestore.V1Beta1\312\002\036Google\\Cloud\\Firest" - + "ore\\V1beta1b\006proto3" + + "cuments/*/**}/{collection_id}\022\276\001\n\016Create" + + "Document\022/.google.firestore.v1beta1.Crea" + + "teDocumentRequest\032\".google.firestore.v1b" + + "eta1.Document\"W\202\323\344\223\002Q\"E/v1beta1/{parent=" + + "projects/*/databases/*/documents/**}/{co" + + "llection_id}:\010document\022\267\001\n\016UpdateDocumen" + + "t\022/.google.firestore.v1beta1.UpdateDocum" + + "entRequest\032\".google.firestore.v1beta1.Do" + + "cument\"P\202\323\344\223\002J2>/v1beta1/{document.name=" + + "projects/*/databases/*/documents/*/**}:\010" + + "document\022\230\001\n\016DeleteDocument\022/.google.fir" + + "estore.v1beta1.DeleteDocumentRequest\032\026.g" + + "oogle.protobuf.Empty\"=\202\323\344\223\0027*5/v1beta1/{" + + "name=projects/*/databases/*/documents/*/" + + "**}\022\310\001\n\021BatchGetDocuments\0222.google.fires" + + "tore.v1beta1.BatchGetDocumentsRequest\0323." + + "google.firestore.v1beta1.BatchGetDocumen" + + "tsResponse\"H\202\323\344\223\002B\"=/v1beta1/{database=p" + + "rojects/*/databases/*}/documents:batchGe" + + "t:\001*0\001\022\313\001\n\020BeginTransaction\0221.google.fir" + + "estore.v1beta1.BeginTransactionRequest\0322" + + ".google.firestore.v1beta1.BeginTransacti" + + "onResponse\"P\202\323\344\223\002J\"E/v1beta1/{database=p" + + "rojects/*/databases/*}/documents:beginTr" + + "ansaction:\001*\022\243\001\n\006Commit\022\'.google.firesto" + + "re.v1beta1.CommitRequest\032(.google.firest" + + "ore.v1beta1.CommitResponse\"F\202\323\344\223\002@\";/v1b" + + "eta1/{database=projects/*/databases/*}/d" + + "ocuments:commit:\001*\022\227\001\n\010Rollback\022).google" + + ".firestore.v1beta1.RollbackRequest\032\026.goo" + + "gle.protobuf.Empty\"H\202\323\344\223\002B\"=/v1beta1/{da" + + "tabase=projects/*/databases/*}/documents" + + ":rollback:\001*\022\364\001\n\010RunQuery\022).google.fires" + + "tore.v1beta1.RunQueryRequest\032*.google.fi" + + "restore.v1beta1.RunQueryResponse\"\216\001\202\323\344\223\002" + + "\207\001\";/v1beta1/{parent=projects/*/database" + + "s/*/documents}:runQuery:\001*ZE\"@/v1beta1/{" + + "parent=projects/*/databases/*/documents/" + + "*/**}:runQuery:\001*0\001\022\243\001\n\005Write\022&.google.f" + + "irestore.v1beta1.WriteRequest\032\'.google.f" + + "irestore.v1beta1.WriteResponse\"E\202\323\344\223\002?\":" + + "/v1beta1/{database=projects/*/databases/" + + "*}/documents:write:\001*(\0010\001\022\247\001\n\006Listen\022\'.g" + + "oogle.firestore.v1beta1.ListenRequest\032(." + + "google.firestore.v1beta1.ListenResponse\"" + + "F\202\323\344\223\002@\";/v1beta1/{database=projects/*/d" + + "atabases/*}/documents:listen:\001*(\0010\001\022\237\002\n\021" + + "ListCollectionIds\0222.google.firestore.v1b" + + "eta1.ListCollectionIdsRequest\0323.google.f" + + "irestore.v1beta1.ListCollectionIdsRespon" + + "se\"\240\001\202\323\344\223\002\231\001\"D/v1beta1/{parent=projects/" + + "*/databases/*/documents}:listCollectionI" + + "ds:\001*ZN\"I/v1beta1/{parent=projects/*/dat" + + "abases/*/documents/*/**}:listCollectionI" + + "ds:\001*\032v\312A\030firestore.googleapis.com\322AXhtt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "orm,https://www.googleapis.com/auth/data" + + "storeB\274\001\n\034com.google.firestore.v1beta1B\016" + + "FirestoreProtoP\001ZAgoogle.golang.org/genp" + + "roto/googleapis/firestore/v1beta1;firest" + + "ore\242\002\004GCFS\252\002\036Google.Cloud.Firestore.V1Be" + + "ta1\312\002\036Google\\Cloud\\Firestore\\V1beta1b\006pr" + + "oto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -337,6 +341,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), }, assigner); internal_static_google_firestore_v1beta1_GetDocumentRequest_descriptor = @@ -590,7 +595,9 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); @@ -601,6 +608,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); + com.google.api.ClientProto.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/QueryProto.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/QueryProto.java index 5f2b9c1d1392..8fad6183ef35 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,10 +32,6 @@ 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 @@ -48,6 +44,10 @@ 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 @@ -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\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" + + "\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" + "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" @@ -179,16 +179,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Field", "Op", "Value", }); - 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_descriptor.getNestedTypes().get(4); internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_descriptor, @@ -196,7 +188,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(6); + internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(5); internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1beta1_StructuredQuery_Order_descriptor, @@ -204,13 +196,21 @@ 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(7); + internal_static_google_firestore_v1beta1_StructuredQuery_descriptor.getNestedTypes().get(6); 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 = 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 b492e4734ca3..ab00e3adc124 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 @@ -5375,95 +5375,87 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldFilter getDefaultInstan } } - public interface ProjectionOrBuilder + public interface UnaryFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.UnaryFilter) com.google.protobuf.MessageOrBuilder { /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - java.util.ListgetFieldsList(); + int getOpValue(); /** * * * - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index); + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp(); + /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - int getFieldsCount(); + boolean hasField(); /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - java.util.List extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsOrBuilderList(); + com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( - int index); + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.OperandTypeCase + getOperandTypeCase(); } /** * * *- * The projection of document's fields to return. + * A filter with a single operand. ** - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} */ - public static final class Projection 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.Projection) - ProjectionOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + UnaryFilterOrBuilder { private static final long serialVersionUID = 0L; - // Use Projection.newBuilder() to construct. - private Projection(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + // Use UnaryFilter.newBuilder() to construct. + private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private Projection() { - fields_ = java.util.Collections.emptyList(); + private UnaryFilter() { + op_ = 0; } @java.lang.Override @@ -5471,7 +5463,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Projection( + private UnaryFilter( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5490,18 +5482,32 @@ private Projection( case 0: done = true; break; + case 8: + { + int rawValue = input.readEnum(); + + op_ = rawValue; + break; + } case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList< - com.google.firestore.v1beta1.StructuredQuery.FieldReference>(); - mutable_bitField0_ |= 0x00000001; + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder subBuilder = + null; + if (operandTypeCase_ == 2) { + subBuilder = + ((com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_) + .toBuilder(); } - fields_.add( + operandType_ = input.readMessage( com.google.firestore.v1beta1.StructuredQuery.FieldReference.parser(), - extensionRegistry)); + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + operandType_ = subBuilder.buildPartial(); + } + operandTypeCase_ = 2; break; } default: @@ -5518,9 +5524,6 @@ private Projection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -5528,112 +5531,302 @@ 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_UnaryFilter_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_UnaryFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Projection.class, - com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); } - public static final int FIELDS_FIELD_NUMBER = 2; - private java.util.Listfields_; - /** - * - * - * - * 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); - } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * A unary operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ * Protobuf enum {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator} */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( - int index) { - return fields_.get(index); - } + 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 expression 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 expression 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); + } + + 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.EnumLiteMapinternalGetValueMap() { + 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; + + 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(2, fields_.get(i)); + 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); } @@ -5644,8 +5837,15 @@ 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 (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; @@ -5657,13 +5857,21 @@ 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.UnaryFilter)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.Projection other = - (com.google.firestore.v1beta1.StructuredQuery.Projection) obj; + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other = + (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) obj; - if (!getFieldsList().equals(other.getFieldsList())) return false; + if (op_ != other.op_) return false; + if (!getOperandTypeCase().equals(other.getOperandTypeCase())) return false; + switch (operandTypeCase_) { + case 2: + if (!getField().equals(other.getField())) return false; + break; + case 0: + default: + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5675,80 +5883,86 @@ 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) + 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.Projection parseFrom( + 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.Projection parseFrom( + 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.Projection parseFrom( + 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.Projection parseFrom( + 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.Projection parseFrom(byte[] data) + 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.Projection parseFrom( + 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.Projection parseFrom( + 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.Projection parseFrom( + 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.Projection parseDelimitedFrom( + 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.Projection 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.Projection 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.Projection parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5766,7 +5980,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.firestore.v1beta1.StructuredQuery.Projection prototype) { + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -5785,32 +5999,32 @@ protected Builder newBuilderForType( * * *- * The projection of document's fields to return. + * A filter with a single operand. ** - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@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.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_Projection_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_Projection_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Projection.class, - com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.Projection.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5821,37 +6035,33 @@ 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(); - } + op_ = 0; + + 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_Projection_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_UnaryFilter_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.UnaryFilter getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.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.UnaryFilter build() { + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -5859,19 +6069,18 @@ 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) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); + 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.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); } + result.operandTypeCase_ = operandTypeCase_; onBuilt(); return result; } @@ -5913,43 +6122,30 @@ 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); + 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.Projection other) { - if (other == com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other) { + if (other == com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.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_); + if (other.op_ != 0) { + setOpValue(other.getOpValue()); + } + switch (other.getOperandTypeCase()) { + case FIELD: + { + mergeField(other.getField()); + 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_); + case OPERANDTYPE_NOT_SET: + { + break; } - } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -5966,12 +6162,12 @@ 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; + 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.Projection) e.getUnfinishedMessage(); + (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -5981,285 +6177,235 @@ public Builder mergeFrom( return this; } - private int bitField0_; - - private java.util.List fields_ = - java.util.Collections.emptyList(); + private int operandTypeCase_ = 0; + private java.lang.Object operandType_; - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList ( - fields_); - bitField0_ |= 0x00000001; - } + public OperandTypeCase getOperandTypeCase() { + return OperandTypeCase.forNumber(operandTypeCase_); } - 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_; + public Builder clearOperandType() { + operandTypeCase_ = 0; + operandType_ = null; + onChanged(); + return this; + } + private int op_ = 0; /** * * * - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - public java.util.List- getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } + public int getOpValue() { + return op_; } /** * * * - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } + public Builder setOpValue(int value) { + op_ = value; + onChanged(); + return this; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } + 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 fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - 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); + public Builder setOp( + com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator value) { + if (value == null) { + throw new NullPointerException(); } + + op_ = value.getNumber(); + onChanged(); return this; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The unary operator to apply. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
*/ - 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()); - } + 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, + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + fieldBuilder_; /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 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; + public boolean hasField() { + return operandTypeCase_ == 2; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public Builder addFields( - int index, com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { + if (fieldBuilder_ == null) { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); } else { - fieldsBuilder_.addMessage(index, value); + if (operandTypeCase_ == 2) { + return fieldBuilder_.getMessage(); + } + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); } - return this; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public Builder addFields( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); + public Builder setField(com.google.firestore.v1beta1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operandType_ = value; onChanged(); } else { - fieldsBuilder_.addMessage(builderForValue.build()); + fieldBuilder_.setMessage(value); } + operandTypeCase_ = 2; return this; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public Builder addFields( - int index, + public Builder setField( 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 extends com.google.firestore.v1beta1.StructuredQuery.FieldReference> - values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + if (fieldBuilder_ == null) { + operandType_ = builderForValue.build(); onChanged(); } else { - fieldsBuilder_.addAllMessages(values); + fieldBuilder_.setMessage(builderForValue.build()); } + operandTypeCase_ = 2; return this; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + 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; + } onChanged(); } else { - fieldsBuilder_.clear(); + if (operandTypeCase_ == 2) { + fieldBuilder_.mergeFrom(value); + } + fieldBuilder_.setMessage(value); } + operandTypeCase_ = 2; return this; } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); + public Builder clearField() { + if (fieldBuilder_ == null) { + if (operandTypeCase_ == 2) { + operandTypeCase_ = 0; + operandType_ = null; + onChanged(); + } } else { - fieldsBuilder_.remove(index); + if (operandTypeCase_ == 2) { + operandTypeCase_ = 0; + operandType_ = null; + } + fieldBuilder_.clear(); } return this; } @@ -6267,122 +6413,67 @@ public Builder removeFields(int index) { * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldsBuilder( - int index) { - return getFieldsFieldBuilder().getBuilder(index); + public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldBuilder() { + return getFieldFieldBuilder().getBuilder(); } /** * * *- * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder - getFieldsOrBuilder(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessageOrBuilder(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 java.util.List< - ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); + getFieldOrBuilder() { + if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { + return fieldBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(fields_); + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; + } + return 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() { - 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__']`. + * The field to which to apply the operator. ** - *repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
*/ - public java.util.List- getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< 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< + 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>( - fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - fields_ = null; + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_, + getParentForChildren(), + isClean()); + operandType_ = null; } - return fieldsBuilder_; + operandTypeCase_ = 2; + onChanged(); + ; + return fieldBuilder_; } @java.lang.Override @@ -6397,127 +6488,124 @@ 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.UnaryFilter) } - // @@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.UnaryFilter) + private static final com.google.firestore.v1beta1.StructuredQuery.UnaryFilter DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Projection(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.UnaryFilter(); } - public static com.google.firestore.v1beta1.StructuredQuery.Projection 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 Projection parsePartialFrom( + public UnaryFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Projection(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.Projection getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface UnaryFilterOrBuilder + public interface OrderOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Order) com.google.protobuf.MessageOrBuilder { /** * * * - * The unary operator to apply. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ - int getOpValue(); + boolean hasField(); /** * * *- * The unary operator to apply. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp(); - + com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ - boolean hasField(); + com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + /** * * *- * The field to which to apply the operator. + * The direction to order by. Defaults to `ASCENDING`. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.Direction direction = 2;
*/ - com.google.firestore.v1beta1.StructuredQuery.FieldReference getField(); + int getDirectionValue(); /** * * *- * The field to which to apply the operator. + * The direction to order by. Defaults to `ASCENDING`. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.Direction direction = 2;
*/ - com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); - - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.OperandTypeCase - getOperandTypeCase(); + com.google.firestore.v1beta1.StructuredQuery.Direction getDirection(); } /** * * *- * A filter with a single operand. + * An order on a field. ** - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Order} */ - public static final class UnaryFilter 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.UnaryFilter) - UnaryFilterOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.Order) + OrderOrBuilder { private static final long serialVersionUID = 0L; - // Use UnaryFilter.newBuilder() to construct. - private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + // Use Order.newBuilder() to construct. + private Order(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private UnaryFilter() { - op_ = 0; + private Order() { + direction_ = 0; } @java.lang.Override @@ -6525,7 +6613,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UnaryFilter( + private Order( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6544,32 +6632,29 @@ private UnaryFilter( case 0: done = true; break; - case 8: - { - int rawValue = input.readEnum(); - - op_ = rawValue; - break; - } - case 18: + case 10: { com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder subBuilder = null; - if (operandTypeCase_ == 2) { - subBuilder = - ((com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_) - .toBuilder(); + if (field_ != null) { + subBuilder = field_.toBuilder(); } - operandType_ = + field_ = 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(); + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); } - operandTypeCase_ = 2; + + break; + } + case 16: + { + int rawValue = input.readEnum(); + + direction_ = rawValue; break; } default: @@ -6593,280 +6678,93 @@ 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_Order_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_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); + 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_; /** * * *- * A unary operator. + * The field to order by. ** - * Protobuf enum {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator} + *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ - 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), - ; - - /** - * - * - *- * 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; - - 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 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(); + } - 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.EnumLiteMapinternalGetValueMap() { - 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_; + public static final int DIRECTION_FIELD_NUMBER = 2; + private int direction_; /** * * * - * The unary operator to apply. + * The direction to order by. Defaults to `ASCENDING`. ** - *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
+ *.google.firestore.v1beta1.StructuredQuery.Direction direction = 2;
*/ - public int getOpValue() { - return op_; + public int getDirectionValue() { + return direction_; } /** * * *- * The unary operator to apply. + * The direction to order by. Defaults to `ASCENDING`. ** - *.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1;
+ *.google.firestore.v1beta1.StructuredQuery.Direction direction = 2;
*/ - public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { + public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { @SuppressWarnings("deprecation") - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); + com.google.firestore.v1beta1.StructuredQuery.Direction result = + com.google.firestore.v1beta1.StructuredQuery.Direction.valueOf(direction_); return result == null - ? com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED + ? com.google.firestore.v1beta1.StructuredQuery.Direction.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 @@ -6881,14 +6779,13 @@ 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 (field_ != null) { + output.writeMessage(1, getField()); } - if (operandTypeCase_ == 2) { - output.writeMessage( - 2, (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + if (direction_ + != com.google.firestore.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, direction_); } unknownFields.writeTo(output); } @@ -6899,15 +6796,13 @@ 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 (field_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); } - if (operandTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_); + if (direction_ + != com.google.firestore.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6919,21 +6814,17 @@ 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.Order)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter other = - (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) obj; + com.google.firestore.v1beta1.StructuredQuery.Order other = + (com.google.firestore.v1beta1.StructuredQuery.Order) obj; - if (op_ != other.op_) return false; - if (!getOperandTypeCase().equals(other.getOperandTypeCase())) return false; - switch (operandTypeCase_) { - case 2: - if (!getField().equals(other.getField())) return false; - break; - case 0: - default: + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField().equals(other.getField())) return false; } + if (direction_ != other.direction_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6945,86 +6836,82 @@ 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 (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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter 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.UnaryFilter parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7041,8 +6928,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter prototype) { + public static Builder newBuilder(com.google.firestore.v1beta1.StructuredQuery.Order prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7061,32 +6947,32 @@ protected Builder newBuilderForType( * * *- * A filter with a single operand. + * An order on a field. ** - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.UnaryFilter} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Order} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@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.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_UnaryFilter_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_UnaryFilter_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.class, - com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Order.class, + com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.Order.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7103,27 +6989,31 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - op_ = 0; + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + direction_ = 0; - 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_UnaryFilter_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Order_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.Order getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.Order.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.Order build() { + com.google.firestore.v1beta1.StructuredQuery.Order result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7131,18 +7021,15 @@ 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.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.operandTypeCase_ = operandTypeCase_; + result.direction_ = direction_; onBuilt(); return result; } @@ -7184,30 +7071,22 @@ 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.Order) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.Order) 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.Order other) { + if (other == com.google.firestore.v1beta1.StructuredQuery.Order.getDefaultInstance()) return this; - if (other.op_ != 0) { - setOpValue(other.getOpValue()); + if (other.hasField()) { + mergeField(other.getField()); } - switch (other.getOperandTypeCase()) { - case FIELD: - { - mergeField(other.getField()); - break; - } - case OPERANDTYPE_NOT_SET: - { - break; - } + if (other.direction_ != 0) { + setDirectionValue(other.getDirectionValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7224,12 +7103,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.Order 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.Order) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7239,99 +7118,7 @@ public Builder mergeFrom( return this; } - 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.firestore.v1beta1.StructuredQuery.FieldReference field_; private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.v1beta1.StructuredQuery.FieldReference, com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder, @@ -7341,176 +7128,161 @@ public Builder clearOp() { * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ public boolean hasField() { - return operandTypeCase_ == 2; + return fieldBuilder_ != null || field_ != null; } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + return field_ == null + ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; } else { - if (operandTypeCase_ == 2) { - return fieldBuilder_.getMessage(); - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + return fieldBuilder_.getMessage(); } } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.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(); } - operandType_ = value; + field_ = value; onChanged(); } else { fieldBuilder_.setMessage(value); } - operandTypeCase_ = 2; + return this; } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ public Builder setField( com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder builderForValue) { if (fieldBuilder_ == null) { - operandType_ = builderForValue.build(); + field_ = builderForValue.build(); onChanged(); } else { fieldBuilder_.setMessage(builderForValue.build()); } - operandTypeCase_ = 2; + return this; } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ 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_) + if (field_ != null) { + field_ = + com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder(field_) .mergeFrom(value) .buildPartial(); } else { - operandType_ = value; + field_ = value; } onChanged(); } else { - if (operandTypeCase_ == 2) { - fieldBuilder_.mergeFrom(value); - } - fieldBuilder_.setMessage(value); + fieldBuilder_.mergeFrom(value); } - operandTypeCase_ = 2; + return this; } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ public Builder clearField() { if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2) { - operandTypeCase_ = 0; - operandType_ = null; - onChanged(); - } + field_ = null; + onChanged(); } else { - if (operandTypeCase_ == 2) { - operandTypeCase_ = 0; - operandType_ = null; - } - fieldBuilder_.clear(); + field_ = null; + fieldBuilder_ = null; } + return this; } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldBuilder() { + + onChanged(); return getFieldFieldBuilder().getBuilder(); } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { + if (fieldBuilder_ != null) { return fieldBuilder_.getMessageOrBuilder(); } else { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance(); + return field_ == null + ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; } } /** * * *- * The field to which to apply the operator. + * The field to order by. ** - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 2;
+ *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
*/ private com.google.protobuf.SingleFieldBuilderV3< com.google.firestore.v1beta1.StructuredQuery.FieldReference, @@ -7518,26 +7290,95 @@ 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>( - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_, - getParentForChildren(), - isClean()); - operandType_ = null; + getField(), getParentForChildren(), isClean()); + field_ = null; } - operandTypeCase_ = 2; - onChanged(); - ; 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(); + } + + 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; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -7550,124 +7391,77 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(builder_scope:google.firestore.v1beta1.StructuredQuery.Order) } - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) - private static final com.google.firestore.v1beta1.StructuredQuery.UnaryFilter 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.UnaryFilter(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Order(); } - public static com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getDefaultInstance() { + public static com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.ParserPARSER = - 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 Order parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UnaryFilter(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.UnaryFilter getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OrderOrBuilder + public interface FieldReferenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.FieldReference) com.google.protobuf.MessageOrBuilder { - /** - * - * - * - * 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(); + /**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.v1beta1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1beta1.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.v1beta1.StructuredQuery.Order) - OrderOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.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 @@ -7675,7 +7469,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 { @@ -7694,29 +7488,11 @@ private Order( case 0: done = true; break; - case 10: - { - 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(); - } - - break; - } - case 16: + case 18: { - int rawValue = input.readEnum(); + java.lang.String s = input.readStringRequireUtf8(); - direction_ = rawValue; + fieldPath_ = s; break; } default: @@ -7740,91 +7516,44 @@ 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_FieldReference_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_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Order.class, - com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.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(); - } - - 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_; + 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.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; + /**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; @@ -7841,13 +7570,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.v1beta1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, direction_); + if (!getFieldPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); } unknownFields.writeTo(output); } @@ -7858,13 +7582,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.v1beta1.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; @@ -7876,17 +7595,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.Order)) { + if (!(obj instanceof com.google.firestore.v1beta1.StructuredQuery.FieldReference)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.Order other = - (com.google.firestore.v1beta1.StructuredQuery.Order) obj; + com.google.firestore.v1beta1.StructuredQuery.FieldReference other = + (com.google.firestore.v1beta1.StructuredQuery.FieldReference) obj; - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField().equals(other.getField())) return false; - } - if (direction_ != other.direction_) return false; + if (!getFieldPath().equals(other.getFieldPath())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7898,82 +7613,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.v1beta1.StructuredQuery.Order 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.Order 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.Order 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.Order 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.Order 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.Order 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.Order 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.Order 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.Order 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.Order 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.Order 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.Order parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7990,7 +7701,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.FieldReference prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8009,32 +7721,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.v1beta1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@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.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_Order_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_Order_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.Order.class, - com.google.firestore.v1beta1.StructuredQuery.Order.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, + com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.Order.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8051,13 +7763,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; } @@ -8065,17 +7771,18 @@ 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_Order_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_FieldReference_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.FieldReference + getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.FieldReference.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.FieldReference build() { + com.google.firestore.v1beta1.StructuredQuery.FieldReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8083,15 +7790,10 @@ 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(); - } - result.direction_ = direction_; + 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; } @@ -8133,22 +7835,21 @@ 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.FieldReference) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.FieldReference) 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.FieldReference other) { + if (other + == com.google.firestore.v1beta1.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(); @@ -8165,12 +7866,13 @@ 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.FieldReference 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.FieldReference) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -8180,263 +7882,56 @@ public Builder mergeFrom( return this; } - private com.google.firestore.v1beta1.StructuredQuery.FieldReference field_; - 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; - } - /** - * - * - *- * 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_; + 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.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); - } - - return this; - } - /** - * - * - *- * 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()); - } - - 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(); + /**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_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - - 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; + /**string field_path = 2;
*/ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - return this; - } - /** - * - * - *- * The field to order by. - *- * - *.google.firestore.v1beta1.StructuredQuery.FieldReference field = 1;
- */ - public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - + fieldPath_ = value; 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_; + return this; } + /**string field_path = 2;
*/ + public Builder clearFieldPath() { - 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; + fieldPath_ = getDefaultInstance().getFieldPath(); 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) { + /**string field_path = 2;
*/ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(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; + fieldPath_ = value; onChanged(); return this; } @@ -8453,77 +7948,136 @@ 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.FieldReference) } - // @@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.FieldReference) + private static final com.google.firestore.v1beta1.StructuredQuery.FieldReference + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Order(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.FieldReference(); } - public static com.google.firestore.v1beta1.StructuredQuery.Order getDefaultInstance() { + public static com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.ParserPARSER = - 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.v1beta1.StructuredQuery.Order getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FieldReferenceOrBuilder + public interface ProjectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.StructuredQuery.Projection) com.google.protobuf.MessageOrBuilder { - /** string field_path = 2;
*/ - java.lang.String getFieldPath(); - /**string field_path = 2;
*/ - com.google.protobuf.ByteString getFieldPathBytes(); + /** + * + * + *+ * 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.ListgetFieldsList(); + /** + * + * + * + * 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 extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + 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); } /** * * *- * A reference to a field, such as `max(messages.time) as max_time`. + * The projection of document's fields to return. ** - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} */ - public static final class FieldReference 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.FieldReference) - FieldReferenceOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1beta1.StructuredQuery.Projection) + ProjectionOrBuilder { private static final long serialVersionUID = 0L; - // Use FieldReference.newBuilder() to construct. - private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + // Use Projection.newBuilder() to construct. + private Projection(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private FieldReference() { - fieldPath_ = ""; + private Projection() { + fields_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -8531,7 +8085,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FieldReference( + private Projection( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8552,9 +8106,16 @@ private FieldReference( break; case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - fieldPath_ = s; + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + 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)); break; } default: @@ -8571,6 +8132,9 @@ private FieldReference( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -8578,44 +8142,94 @@ 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_Projection_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_Projection_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Projection.class, + com.google.firestore.v1beta1.StructuredQuery.Projection.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 FIELDS_FIELD_NUMBER = 2; + private java.util.Listfields_; + /** + * + * + * + * 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_; } - /** 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 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); } private byte memoizedIsInitialized = -1; @@ -8632,8 +8246,8 @@ 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_); + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(2, fields_.get(i)); } unknownFields.writeTo(output); } @@ -8644,8 +8258,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getFieldPathBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -8657,13 +8271,13 @@ 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.Projection)) { return super.equals(obj); } - com.google.firestore.v1beta1.StructuredQuery.FieldReference other = - (com.google.firestore.v1beta1.StructuredQuery.FieldReference) obj; + com.google.firestore.v1beta1.StructuredQuery.Projection other = + (com.google.firestore.v1beta1.StructuredQuery.Projection) obj; - if (!getFieldPath().equals(other.getFieldPath())) return false; + if (!getFieldsList().equals(other.getFieldsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -8675,78 +8289,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFieldPath().hashCode(); + 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference 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.FieldReference parseFrom( + public static com.google.firestore.v1beta1.StructuredQuery.Projection parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8764,7 +8380,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.firestore.v1beta1.StructuredQuery.FieldReference prototype) { + com.google.firestore.v1beta1.StructuredQuery.Projection prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8783,32 +8399,32 @@ protected Builder newBuilderForType( * * *- * A reference to a field, such as `max(messages.time) as max_time`. + * The projection of document's fields to return. ** - * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1beta1.StructuredQuery.Projection} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@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.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_FieldReference_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_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1beta1.StructuredQuery.FieldReference.class, - com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1beta1.StructuredQuery.Projection.class, + com.google.firestore.v1beta1.StructuredQuery.Projection.Builder.class); } - // Construct using com.google.firestore.v1beta1.StructuredQuery.FieldReference.newBuilder() + // Construct using com.google.firestore.v1beta1.StructuredQuery.Projection.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8819,32 +8435,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(); - fieldPath_ = ""; - + 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_FieldReference_descriptor; + .internal_static_google_firestore_v1beta1_StructuredQuery_Projection_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.Projection getDefaultInstanceForType() { + return com.google.firestore.v1beta1.StructuredQuery.Projection.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.Projection build() { + com.google.firestore.v1beta1.StructuredQuery.Projection result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8852,10 +8473,19 @@ 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.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) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } onBuilt(); return result; } @@ -8897,21 +8527,43 @@ 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.Projection) { + return mergeFrom((com.google.firestore.v1beta1.StructuredQuery.Projection) 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.Projection other) { + if (other == com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance()) return this; - if (!other.getFieldPath().isEmpty()) { - fieldPath_ = other.fieldPath_; - onChanged(); + 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(); @@ -8928,13 +8580,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.Projection 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.Projection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -8944,64 +8595,414 @@ 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; + private int bitField0_; + + private java.util.Listfields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + 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 (java.lang.String) ref; + return fieldsBuilder_.getMessageList(); } } - /** 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 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 (com.google.protobuf.ByteString) ref; + return fieldsBuilder_.getCount(); } } - /**string field_path = 2;
*/ - public Builder setFieldPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *+ * 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); } - - fieldPath_ = value; - onChanged(); - return this; } - /**string field_path = 2;
*/ - public Builder clearFieldPath() { - - fieldPath_ = getDefaultInstance().getFieldPath(); - onChanged(); + /** + * + * + *+ * 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; } - /**string field_path = 2;
*/ - public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *+ * 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()); } - checkByteStringIsUtf8(value); - - fieldPath_ = value; - onChanged(); return this; } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 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 extends com.google.firestore.v1beta1.StructuredQuery.FieldReference> + values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + 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); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + 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); + } + 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); + } else { + return fieldsBuilder_.getMessageOrBuilder(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 java.util.List< + ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(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 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(); + } + + 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) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -9010,43 +9011,42 @@ 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.Projection) } - // @@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.Projection) + private static final com.google.firestore.v1beta1.StructuredQuery.Projection DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.FieldReference(); + DEFAULT_INSTANCE = new com.google.firestore.v1beta1.StructuredQuery.Projection(); } - public static com.google.firestore.v1beta1.StructuredQuery.FieldReference getDefaultInstance() { + 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 FieldReference parsePartialFrom( + public Projection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldReference(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.FieldReference getDefaultInstanceForType() { + public com.google.firestore.v1beta1.StructuredQuery.Projection 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 22f9f292fe6b..5a2e2c419124 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 @@ -2230,12 +2230,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * * - * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
@@ -3426,12 +3422,8 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
@@ -3443,12 +3435,8 @@ public int getTargetId() { * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
@@ -3463,12 +3451,8 @@ public Builder setTargetId(int value) { * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java index 48129f1aa26c..0d067f969efb 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java @@ -401,10 +401,7 @@ public com.google.firestore.v1beta1.TargetChange.TargetChangeType getTargetChang ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -418,10 +415,7 @@ public java.util.ListgetTargetIdsList() { * * The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -435,10 +429,7 @@ public int getTargetIdsCount() { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1094,10 +1085,7 @@ private void ensureTargetIdsIsMutable() { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1113,10 +1101,7 @@ public java.util.ListgetTargetIdsList() { * * The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1130,10 +1115,7 @@ public int getTargetIdsCount() { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1147,10 +1129,7 @@ public int getTargetIds(int index) { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1167,10 +1146,7 @@ public Builder setTargetIds(int index, int value) { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1187,10 +1163,7 @@ public Builder addTargetIds(int value) { ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -1207,10 +1180,7 @@ public Builder addAllTargetIds(java.lang.Iterable extends java.lang.Integer> v ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
diff --git a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChangeOrBuilder.java b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChangeOrBuilder.java index 0745cdfd3992..60d9649a32a6 100644 --- a/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChangeOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChangeOrBuilder.java @@ -35,10 +35,7 @@ public interface TargetChangeOrBuilder ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -50,10 +47,7 @@ public interface TargetChangeOrBuilder ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
@@ -65,10 +59,7 @@ public interface TargetChangeOrBuilder ** The target IDs of targets that have changed. * If empty, the change applies to all targets. - * For `target_change_type=ADD`, the order of the target IDs matches the order - * of the requests to add the targets. This allows clients to unambiguously - * associate server-assigned target IDs with added targets. - * For other states, the order of the target IDs is not defined. + * The order of the target IDs is not defined. ** *repeated int32 target_ids = 2;
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 a7b5a1dd63bf..737529398d64 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 @@ -120,12 +120,8 @@ public interface TargetOrBuilder * * *- * A client provided target ID. - * If not set, the server will assign an ID for the target. - * Used for resuming a target without changing IDs. The IDs can either be - * client-assigned or be server-assigned in a previous stream. All targets - * with client provided IDs must be added before adding a target that needs - * a server-assigned id. + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. ** *int32 target_id = 5;
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 87c88a3be630..2eaa183470d7 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 @@ -28,7 +28,6 @@ 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. 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 8a043df59980..7caae4688a5f 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 @@ -30,7 +30,6 @@ 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 b7ba79075a40..ff0f03c709d6 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 @@ -25,6 +25,7 @@ import "google/firestore/v1beta1/write.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -33,6 +34,7 @@ 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. @@ -52,6 +54,11 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; // committed. Any read with an equal or greater `read_time` is guaranteed // to see the effects of the transaction. service Firestore { + option (google.api.default_host) = "firestore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/datastore"; + // Gets a single document. rpc GetDocument(GetDocumentRequest) returns (Document) { option (google.api.http) = { @@ -654,14 +661,8 @@ message Target { google.protobuf.Timestamp read_time = 11; } - // A client provided target ID. - // - // If not set, the server will assign an ID for the target. - // - // Used for resuming a target without changing IDs. The IDs can either be - // client-assigned or be server-assigned in a previous stream. All targets - // with client provided IDs must be added before adding a target that needs - // a server-assigned id. + // The target ID that identifies the target on the stream. Must be a positive + // number and non-zero. int32 target_id = 5; // If the target should be removed once it is current and consistent. @@ -706,11 +707,7 @@ message TargetChange { // // If empty, the change applies to all targets. // - // For `target_change_type=ADD`, the order of the target IDs matches the order - // of the requests to add the targets. This allows clients to unambiguously - // associate server-assigned target IDs with added targets. - // - // For other states, the order of the target IDs is not defined. + // The order of the target IDs is not defined. repeated int32 target_ids = 2; // The error that resulted in this change, if applicable. 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 94eec9cbbf3f..fb9e4e558004 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 @@ -29,7 +29,6 @@ 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`. @@ -115,15 +114,6 @@ 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. @@ -134,7 +124,7 @@ message StructuredQuery { // Test if a field is equal to NaN. IS_NAN = 2; - // Test if an exprestion evaluates to Null. + // Test if an expression evaluates to Null. IS_NULL = 3; } @@ -157,6 +147,11 @@ message StructuredQuery { Direction direction = 2; } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + // A sort direction. enum Direction { // Unspecified. @@ -169,9 +164,13 @@ 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 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; } // The projection to return. 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 4e58cc1216e1..c02a2a8a1ac1 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 @@ -30,7 +30,6 @@ 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. diff --git a/google-cloud-clients/google-cloud-firestore/synth.metadata b/google-cloud-clients/google-cloud-firestore/synth.metadata index cd041bb77d5f..2c64462a12f4 100644 --- a/google-cloud-clients/google-cloud-firestore/synth.metadata +++ b/google-cloud-clients/google-cloud-firestore/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-09-04T07:48:07.466770Z", + "updateTime": "2019-10-02T07:44:03.037276Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.2", - "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" + "version": "0.37.1", + "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a2158681f6e30c5fd9446eb1fd7b5021a6d48bfa", - "internalRef": "266999433" + "sha": "2123bcae97debe57e0870fca157cdf21e32bf3fb", + "internalRef": "272289410" } } ],