From efbb545ff607c826a1b7d7b4b375918e57ff0b22 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 18 Sep 2019 13:36:29 -0700 Subject: [PATCH] Synchronize new proto/yaml changes. PiperOrigin-RevId: 269879059 --- google/firestore/admin/v1/field.proto | 7 +--- .../firestore/admin/v1/firestore_admin.proto | 7 +++- google/firestore/admin/v1/index.proto | 12 +++--- google/firestore/admin/v1/location.proto | 1 - google/firestore/admin/v1/operation.proto | 23 ++++++------ .../admin/v1beta1/firestore_admin.proto | 7 +++- google/firestore/admin/v1beta1/index.proto | 1 - google/firestore/admin/v1beta1/location.proto | 1 - google/firestore/admin/v1beta2/field.proto | 7 +--- .../admin/v1beta2/firestore_admin.proto | 7 +++- google/firestore/admin/v1beta2/index.proto | 12 +++--- .../firestore/admin/v1beta2/operation.proto | 1 - google/firestore/v1/common.proto | 1 - google/firestore/v1/document.proto | 1 - google/firestore/v1/firestore.proto | 23 +++++------- google/firestore/v1/query.proto | 37 +++++++++---------- google/firestore/v1/write.proto | 1 - google/firestore/v1beta1/common.proto | 1 - google/firestore/v1beta1/document.proto | 1 - google/firestore/v1beta1/firestore.proto | 23 +++++------- google/firestore/v1beta1/query.proto | 27 +++++++------- google/firestore/v1beta1/write.proto | 1 - 22 files changed, 98 insertions(+), 104 deletions(-) diff --git a/google/firestore/admin/v1/field.proto b/google/firestore/admin/v1/field.proto index a24e1aaf1d..14891596d1 100644 --- a/google/firestore/admin/v1/field.proto +++ b/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/firestore/admin/v1/firestore_admin.proto b/google/firestore/admin/v1/firestore_admin.proto index e753686b20..234827bef2 100644 --- a/google/firestore/admin/v1/firestore_admin.proto +++ b/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/firestore/admin/v1/index.proto b/google/firestore/admin/v1/index.proto index 94941d3a07..f2038c581c 100644 --- a/google/firestore/admin/v1/index.proto +++ b/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/firestore/admin/v1/location.proto b/google/firestore/admin/v1/location.proto index 7b56051a5c..d9dc6f9b98 100644 --- a/google/firestore/admin/v1/location.proto +++ b/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/firestore/admin/v1/operation.proto b/google/firestore/admin/v1/operation.proto index d333d9b7de..08194fe093 100644 --- a/google/firestore/admin/v1/operation.proto +++ b/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/firestore/admin/v1beta1/firestore_admin.proto b/google/firestore/admin/v1beta1/firestore_admin.proto index 5058722591..5d7908b937 100644 --- a/google/firestore/admin/v1beta1/firestore_admin.proto +++ b/google/firestore/admin/v1beta1/firestore_admin.proto @@ -22,6 +22,7 @@ import "google/firestore/admin/v1beta1/index.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin"; @@ -30,7 +31,6 @@ option java_outer_classname = "FirestoreAdminProto"; option java_package = "com.google.firestore.admin.v1beta1"; option objc_class_prefix = "GCFS"; - // The Cloud Firestore Admin API. // // This API provides several administrative services for Cloud Firestore. @@ -75,6 +75,11 @@ option objc_class_prefix = "GCFS"; // 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 the specified index. // A newly created index's initial state is `CREATING`. On completion of the // returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`. diff --git a/google/firestore/admin/v1beta1/index.proto b/google/firestore/admin/v1beta1/index.proto index 285e0a5330..0ca95985b5 100644 --- a/google/firestore/admin/v1beta1/index.proto +++ b/google/firestore/admin/v1beta1/index.proto @@ -26,7 +26,6 @@ option java_outer_classname = "IndexProto"; option java_package = "com.google.firestore.admin.v1beta1"; option objc_class_prefix = "GCFS"; - // A field of an index. message IndexField { // The mode determines how a field is indexed. diff --git a/google/firestore/admin/v1beta1/location.proto b/google/firestore/admin/v1beta1/location.proto index 2e6dff1b9d..2201b07dd3 100644 --- a/google/firestore/admin/v1beta1/location.proto +++ b/google/firestore/admin/v1beta1/location.proto @@ -27,7 +27,6 @@ option java_outer_classname = "LocationProto"; option java_package = "com.google.firestore.admin.v1beta1"; option objc_class_prefix = "GCFS"; - // The metadata message for [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. message LocationMetadata { diff --git a/google/firestore/admin/v1beta2/field.proto b/google/firestore/admin/v1beta2/field.proto index 8b2599caf2..cec3551908 100644 --- a/google/firestore/admin/v1beta2/field.proto +++ b/google/firestore/admin/v1beta2/field.proto @@ -27,7 +27,6 @@ option java_outer_classname = "FieldProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Represents a single field in the database. // // Fields are grouped by their "Collection Group", which represent all @@ -38,14 +37,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/firestore/admin/v1beta2/firestore_admin.proto b/google/firestore/admin/v1beta2/firestore_admin.proto index a1ec525c64..56ca764bd0 100644 --- a/google/firestore/admin/v1beta2/firestore_admin.proto +++ b/google/firestore/admin/v1beta2/firestore_admin.proto @@ -23,6 +23,7 @@ import "google/firestore/admin/v1beta2/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.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; @@ -31,10 +32,14 @@ option java_outer_classname = "FirestoreAdminProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // 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.v1beta2.IndexOperationMetadata]. diff --git a/google/firestore/admin/v1beta2/index.proto b/google/firestore/admin/v1beta2/index.proto index d6c738d878..c5dc6b982d 100644 --- a/google/firestore/admin/v1beta2/index.proto +++ b/google/firestore/admin/v1beta2/index.proto @@ -26,7 +26,6 @@ option java_outer_classname = "IndexProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Cloud Firestore indexes enable simple and complex queries against // documents in a database. message Index { @@ -81,6 +80,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 @@ -113,8 +117,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. @@ -142,7 +145,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/firestore/admin/v1beta2/operation.proto b/google/firestore/admin/v1beta2/operation.proto index 871f1c16f1..d9a1f84ee6 100644 --- a/google/firestore/admin/v1beta2/operation.proto +++ b/google/firestore/admin/v1beta2/operation.proto @@ -28,7 +28,6 @@ option java_outer_classname = "OperationProto"; option java_package = "com.google.firestore.admin.v1beta2"; option objc_class_prefix = "GCFS"; - // Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex]. message IndexOperationMetadata { diff --git a/google/firestore/v1/common.proto b/google/firestore/v1/common.proto index 59c62997ad..8e2ef27ff2 100644 --- a/google/firestore/v1/common.proto +++ b/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/firestore/v1/document.proto b/google/firestore/v1/document.proto index d3d9c11c79..9110b4ff60 100644 --- a/google/firestore/v1/document.proto +++ b/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/firestore/v1/firestore.proto b/google/firestore/v1/firestore.proto index 5dc9667e2c..2fb25deb7b 100644 --- a/google/firestore/v1/firestore.proto +++ b/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/firestore/v1/query.proto b/google/firestore/v1/query.proto index 48684c0607..e2d7b836ff 100644 --- a/google/firestore/v1/query.proto +++ b/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/firestore/v1/write.proto b/google/firestore/v1/write.proto index 4ab5d833e3..51d9239180 100644 --- a/google/firestore/v1/write.proto +++ b/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/firestore/v1beta1/common.proto b/google/firestore/v1beta1/common.proto index 87c88a3be6..2eaa183470 100644 --- a/google/firestore/v1beta1/common.proto +++ b/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/firestore/v1beta1/document.proto b/google/firestore/v1beta1/document.proto index 8a043df599..7caae4688a 100644 --- a/google/firestore/v1beta1/document.proto +++ b/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/firestore/v1beta1/firestore.proto b/google/firestore/v1beta1/firestore.proto index b7ba79075a..ff0f03c709 100644 --- a/google/firestore/v1beta1/firestore.proto +++ b/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/firestore/v1beta1/query.proto b/google/firestore/v1beta1/query.proto index 94eec9cbbf..fb9e4e5580 100644 --- a/google/firestore/v1beta1/query.proto +++ b/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/firestore/v1beta1/write.proto b/google/firestore/v1beta1/write.proto index 4e58cc1216..c02a2a8a1a 100644 --- a/google/firestore/v1beta1/write.proto +++ b/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.