diff options
author | Google APIs <noreply@google.com> | 2019-03-21 11:17:51 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2019-03-21 11:18:24 -0700 |
commit | d542a0b27b6b8a6d3869c3919e53c61a63cc4cc3 (patch) | |
tree | c28d06856d7a3c44759a53060a56231263835d09 | |
parent | 8c71ea479e198051a303bd3f2945719b5d46feb5 (diff) | |
download | googleapis-d542a0b27b6b8a6d3869c3919e53c61a63cc4cc3.tar.gz |
Synchronize new proto/yaml changes.
PiperOrigin-RevId: 239633958
25 files changed, 527 insertions, 428 deletions
diff --git a/google/firestore/admin/artman_firestore_v1.yaml b/google/firestore/admin/artman_firestore_v1.yaml new file mode 100644 index 000000000..ee6ce029a --- /dev/null +++ b/google/firestore/admin/artman_firestore_v1.yaml @@ -0,0 +1,34 @@ +common: + api_name: firestore-admin + api_version: v1 + organization_name: google-cloud + proto_deps: + - name: google-common-protos + src_proto_paths: + - v1 + service_yaml: firestore_admin_v1.yaml + gapic_yaml: v1/firestore_gapic.yaml +artifacts: +- name: gapic_config + type: GAPIC_CONFIG +- name: java_gapic + type: GAPIC + language: JAVA +- name: python_gapic + type: GAPIC + language: PYTHON +- name: nodejs_gapic + type: GAPIC + language: NODEJS +- name: php_gapic + type: GAPIC + language: PHP +- name: go_gapic + type: GAPIC + language: GO +- name: ruby_gapic + type: GAPIC + language: RUBY +- name: csharp_gapic + type: GAPIC + language: CSHARP diff --git a/google/firestore/admin/firestore_admin.yaml b/google/firestore/admin/firestore_admin_v1.yaml index 95b76c052..aabec468e 100644 --- a/google/firestore/admin/firestore_admin.yaml +++ b/google/firestore/admin/firestore_admin_v1.yaml @@ -3,17 +3,26 @@ config_version: 3 name: firestore.googleapis.com title: Google Cloud Firestore Admin API +documentation: + summary: > + Accesses the NoSQL document database built for automatic scaling, + high performance, and ease of application development. + overview: | + (== suppress_warning control-presence ==) + (== suppress_warning quota-presence ==) + (== suppress_warning http-rest ==) + (== suppress_warning versioning-http-version-prefix ==) + apis: -- name: google.firestore.admin.v1beta1.FirestoreAdmin -- name: google.firestore.admin.v1beta2.FirestoreAdmin +- name: google.firestore.admin.v1.FirestoreAdmin types: -- name: google.firestore.admin.v1beta1.IndexOperationMetadata -- name: google.firestore.admin.v1beta1.LocationMetadata -- name: google.firestore.admin.v1beta1.ExportDocumentsMetadata -- name: google.firestore.admin.v1beta1.ImportDocumentsMetadata -- name: google.firestore.admin.v1beta1.ExportDocumentsResponse -- name: google.firestore.admin.v1beta2.FieldOperationMetadata +- name: google.firestore.admin.v1.IndexOperationMetadata +- name: google.firestore.admin.v1.LocationMetadata +- name: google.firestore.admin.v1.ExportDocumentsMetadata +- name: google.firestore.admin.v1.ImportDocumentsMetadata +- name: google.firestore.admin.v1.ExportDocumentsResponse +- name: google.firestore.admin.v1.FieldOperationMetadata http: rules: diff --git a/google/firestore/admin/v1/field.proto b/google/firestore/admin/v1/field.proto index 9c768fd98..a24e1aaf1 100644 --- a/google/firestore/admin/v1/field.proto +++ b/google/firestore/admin/v1/field.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.admin.v1; -import "google/api/annotations.proto"; import "google/firestore/admin/v1/index.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; @@ -28,6 +28,7 @@ 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 diff --git a/google/firestore/admin/v1/firestore_admin.proto b/google/firestore/admin/v1/firestore_admin.proto index 19bc49703..e753686b2 100644 --- a/google/firestore/admin/v1/firestore_admin.proto +++ b/google/firestore/admin/v1/firestore_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,14 +32,13 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; + // Operations are created by service `FirestoreAdmin`, but are accessed via // service `google.longrunning.Operations`. service FirestoreAdmin { - // Creates a composite index. This returns a - // [google.longrunning.Operation][google.longrunning.Operation] which may be - // used to track the status of the creation. The metadata for the operation - // will be the type - // [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] + // which may be used to track the status of the creation. The metadata for + // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" @@ -77,16 +76,13 @@ service FirestoreAdmin { // Updates a field configuration. Currently, field updates apply only to // single field index configuration. However, calls to - // [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] - // should provide a field mask to avoid changing any configuration that the - // caller isn't aware of. The field mask should be specified as: `{ paths: - // "index_config" }`. + // [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid + // changing any configuration that the caller isn't aware of. The field mask + // should be specified as: `{ paths: "index_config" }`. // - // This call returns a - // [google.longrunning.Operation][google.longrunning.Operation] which may be - // used to track the status of the field update. The metadata for the - // operation will be the type - // [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + // track the status of the field update. The metadata for + // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. // // To configure the default field settings for the database, use // the special `Field` with resource name: @@ -100,12 +96,10 @@ service FirestoreAdmin { // Lists the field configuration and metadata for this database. // - // Currently, - // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - // only supports listing fields that have been explicitly overridden. To issue - // this query, call - // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - // with the filter set to `indexConfig.usesAncestorConfig:false`. + // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields" @@ -120,8 +114,7 @@ service FirestoreAdmin { // used once the associated operation is done. If an export operation is // cancelled before completion it may leave partial data behind in Google // Cloud Storage. - rpc ExportDocuments(ExportDocumentsRequest) - returns (google.longrunning.Operation) { + rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/databases/*}:exportDocuments" body: "*" @@ -133,8 +126,7 @@ service FirestoreAdmin { // progress can be monitored and managed via the Operation resource that is // created. If an ImportDocuments operation is cancelled, it is possible // that a subset of the data has already been imported to Cloud Firestore. - rpc ImportDocuments(ImportDocumentsRequest) - returns (google.longrunning.Operation) { + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/databases/*}:importDocuments" body: "*" @@ -142,8 +134,7 @@ service FirestoreAdmin { } } -// The request for -// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. message CreateIndexRequest { // A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -153,8 +144,7 @@ message CreateIndexRequest { Index index = 2; } -// The request for -// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. message ListIndexesRequest { // A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -167,13 +157,12 @@ message ListIndexesRequest { int32 page_size = 3; // A page token, returned from a previous call to - // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - // that may be used to get the next page of results. + // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + // page of results. string page_token = 4; } -// The response for -// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. message ListIndexesResponse { // The requested indexes. repeated Index indexes = 1; @@ -183,24 +172,21 @@ message ListIndexesResponse { string next_page_token = 2; } -// The request for -// [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex]. +// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex]. message GetIndexRequest { // A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` string name = 1; } -// The request for -// [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. +// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. message DeleteIndexRequest { // A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` string name = 1; } -// The request for -// [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. +// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. message UpdateFieldRequest { // The field to be updated. Field field = 1; @@ -210,40 +196,36 @@ message UpdateFieldRequest { google.protobuf.FieldMask update_mask = 2; } -// The request for -// [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField]. +// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField]. message GetFieldRequest { // A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` string name = 1; } -// The request for -// [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. message ListFieldsRequest { // A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` string parent = 1; // The filter to apply to list results. Currently, - // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - // only supports listing fields that have been explicitly overridden. To issue - // this query, call - // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - // with the filter set to `indexConfig.usesAncestorConfig:false`. + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. string filter = 2; // The number of results to return. int32 page_size = 3; // A page token, returned from a previous call to - // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - // that may be used to get the next page of results. + // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + // page of results. string page_token = 4; } -// The response for -// [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. message ListFieldsResponse { // The requested fields. repeated Field fields = 1; @@ -253,8 +235,7 @@ message ListFieldsResponse { string next_page_token = 2; } -// The request for -// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. message ExportDocumentsRequest { // Database to export. Should be of the form: // `projects/{project_id}/databases/{database_id}`. @@ -274,8 +255,7 @@ message ExportDocumentsRequest { string output_uri_prefix = 3; } -// The request for -// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. message ImportDocumentsRequest { // Database to import into. Should be of the form: // `projects/{project_id}/databases/{database_id}`. diff --git a/google/firestore/admin/v1/firestore_gapic.yaml b/google/firestore/admin/v1/firestore_gapic.yaml new file mode 100644 index 000000000..9d542308f --- /dev/null +++ b/google/firestore/admin/v1/firestore_gapic.yaml @@ -0,0 +1,173 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +language_settings: + java: + package_name: com.google.cloud.firestore.v1 + python: + package_name: google.cloud.firestore_v1.gapic + go: + package_name: cloud.google.com/go/firestore/apiv1 + domain_layer_location: cloud.google.com/go/firestore + csharp: + package_name: Google.Cloud.Firestore.V1 + ruby: + package_name: Google::Cloud::Firestore::V1 + php: + package_name: Google\Cloud\Firestore\V1 + nodejs: + package_name: firestore.v1 + domain_layer_location: google-cloud +license_header: + copyright_file: copyright-google.txt + license_file: license-header-apache-2.0.txt +interfaces: +- name: google.firestore.admin.v1.FirestoreAdmin + collections: + - name_pattern: projects/{project}/databases/{database} + entity_name: database + - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id} + entity_name: parent + - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id} + entity_name: index + - name_pattern: projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id} + entity_name: field + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + methods: + - name: CreateIndex + flattening: + groups: + - parameters: + - parent + - index + required_fields: + - parent + - index + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + parent: parent + timeout_millis: 60000 + - name: ListIndexes + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: indexes + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: parent + timeout_millis: 60000 + - name: GetIndex + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: index + timeout_millis: 60000 + - name: DeleteIndex + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: index + timeout_millis: 60000 + - name: ImportDocuments + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: database + timeout_millis: 60000 + - name: ExportDocuments + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: database + timeout_millis: 60000 + - name: GetField + flattening: + groups: + - parameters: + - name + required_fields: + - name + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + name: field + timeout_millis: 60000 + - name: ListFields + flattening: + groups: + - parameters: + - parent + required_fields: + - parent + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: fields + retry_codes_name: idempotent + retry_params_name: default + field_name_patterns: + parent: parent + timeout_millis: 60000 + - name: UpdateField + flattening: + groups: + - parameters: + - field + required_fields: + - field + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 60000 + diff --git a/google/firestore/admin/v1/index.proto b/google/firestore/admin/v1/index.proto index 60087a547..94941d3a0 100644 --- a/google/firestore/admin/v1/index.proto +++ b/google/firestore/admin/v1/index.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ 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 { diff --git a/google/firestore/admin/v1/location.proto b/google/firestore/admin/v1/location.proto index 3594a0cd9..7b56051a5 100644 --- a/google/firestore/admin/v1/location.proto +++ b/google/firestore/admin/v1/location.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.admin.v1; -import "google/api/annotations.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; @@ -28,6 +28,8 @@ 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 {} + +// 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 50706e3bf..d333d9b7d 100644 --- a/google/firestore/admin/v1/operation.proto +++ b/google/firestore/admin/v1/operation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ syntax = "proto3"; package google.firestore.admin.v1; -import "google/api/annotations.proto"; import "google/firestore/admin/v1/index.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin"; @@ -29,8 +29,8 @@ 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 + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. message IndexOperationMetadata { // The time this operation started. @@ -54,8 +54,7 @@ message IndexOperationMetadata { Progress progress_bytes = 6; } -// Metadata for [google.longrunning.Operation][google.longrunning.Operation] -// results from +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. message FieldOperationMetadata { // Information about an index configuration change. @@ -90,9 +89,8 @@ message FieldOperationMetadata { // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` string field = 3; - // A list of - // [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - // which describe the intent of this operation. + // A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + // operation. repeated IndexConfigDelta index_config_deltas = 4; // The state of the operation. @@ -105,8 +103,7 @@ message FieldOperationMetadata { Progress progress_bytes = 7; } -// Metadata for [google.longrunning.Operation][google.longrunning.Operation] -// results from +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. message ExportDocumentsMetadata { // The time this operation started. @@ -132,8 +129,7 @@ message ExportDocumentsMetadata { string output_uri_prefix = 7; } -// Metadata for [google.longrunning.Operation][google.longrunning.Operation] -// results from +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. message ImportDocumentsMetadata { // The time this operation started. @@ -159,8 +155,7 @@ message ImportDocumentsMetadata { string input_uri_prefix = 7; } -// Returned in the [google.longrunning.Operation][google.longrunning.Operation] -// response field. +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. message ExportDocumentsResponse { // Location of the output files. This can be used to begin an import // into Cloud Firestore (this project or another project) after the operation @@ -168,17 +163,6 @@ 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. @@ -207,3 +191,14 @@ 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 5e1cae155..505872259 100644 --- a/google/firestore/admin/v1beta1/firestore_admin.proto +++ b/google/firestore/admin/v1beta1/firestore_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ 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. @@ -76,15 +77,14 @@ option objc_class_prefix = "GCFS"; service FirestoreAdmin { // 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`. If the index already exists, the call will return an - // `ALREADY_EXISTS` status. + // returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`. + // If the index already exists, the call will return an `ALREADY_EXISTS` + // status. // // During creation, the process could result in an error, in which case the // index will move to the `ERROR` state. The process can be recovered by // fixing the data that caused the error, removing the index with - // [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then - // re-creating the index with + // [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then re-creating the index with // [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex]. // // Indexes with a single field cannot be created. @@ -124,8 +124,7 @@ service FirestoreAdmin { // used once the associated operation is done. If an export operation is // cancelled before completion it may leave partial data behind in Google // Cloud Storage. - rpc ExportDocuments(ExportDocumentsRequest) - returns (google.longrunning.Operation) { + rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/databases/*}:exportDocuments" body: "*" @@ -137,8 +136,7 @@ service FirestoreAdmin { // progress can be monitored and managed via the Operation resource that is // created. If an ImportDocuments operation is cancelled, it is possible // that a subset of the data has already been imported to Cloud Firestore. - rpc ImportDocuments(ImportDocumentsRequest) - returns (google.longrunning.Operation) { + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/databases/*}:importDocuments" body: "*" @@ -147,8 +145,7 @@ service FirestoreAdmin { } // Metadata for index operations. This metadata populates -// the metadata field of -// [google.longrunning.Operation][google.longrunning.Operation]. +// the metadata field of [google.longrunning.Operation][google.longrunning.Operation]. message IndexOperationMetadata { // The type of index operation. enum OperationType { @@ -175,8 +172,7 @@ message IndexOperationMetadata { // True if the [google.longrunning.Operation] was cancelled. If the // cancellation is in progress, cancelled will be true but - // [google.longrunning.Operation.done][google.longrunning.Operation.done] will - // be false. + // [google.longrunning.Operation.done][google.longrunning.Operation.done] will be false. bool cancelled = 5; // Progress of the existing operation, measured in number of documents. @@ -194,8 +190,7 @@ message Progress { int64 work_estimated = 2; } -// The request for -// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex]. +// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex]. message CreateIndexRequest { // The name of the database this index will apply to. For example: // `projects/{project_id}/databases/{database_id}` @@ -206,16 +201,14 @@ message CreateIndexRequest { Index index = 2; } -// The request for -// [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex]. +// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex]. message GetIndexRequest { // The name of the index. For example: // `projects/{project_id}/databases/{database_id}/indexes/{index_id}` string name = 1; } -// The request for -// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes]. +// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes]. message ListIndexesRequest { // The database name. For example: // `projects/{project_id}/databases/{database_id}` @@ -230,16 +223,14 @@ message ListIndexesRequest { string page_token = 4; } -// The request for -// [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex]. +// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex]. message DeleteIndexRequest { // The index name. For example: // `projects/{project_id}/databases/{database_id}/indexes/{index_id}` string name = 1; } -// The response for -// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes]. +// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes]. message ListIndexesResponse { // The indexes. repeated Index indexes = 1; @@ -248,8 +239,7 @@ message ListIndexesResponse { string next_page_token = 2; } -// The request for -// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ExportDocuments]. +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ExportDocuments]. message ExportDocumentsRequest { // Database to export. Should be of the form: // `projects/{project_id}/databases/{database_id}`. @@ -269,8 +259,7 @@ message ExportDocumentsRequest { string output_uri_prefix = 4; } -// The request for -// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ImportDocuments]. +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta1.FirestoreAdmin.ImportDocuments]. message ImportDocumentsRequest { // Database to import into. Should be of the form: // `projects/{project_id}/databases/{database_id}`. @@ -288,8 +277,7 @@ message ImportDocumentsRequest { string input_uri_prefix = 4; } -// Returned in the [google.longrunning.Operation][google.longrunning.Operation] -// response field. +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. message ExportDocumentsResponse { // Location of the output files. This can be used to begin an import // into Cloud Firestore (this project or another project) after the operation diff --git a/google/firestore/admin/v1beta1/index.proto b/google/firestore/admin/v1beta1/index.proto index 4034047f4..285e0a533 100644 --- a/google/firestore/admin/v1beta1/index.proto +++ b/google/firestore/admin/v1beta1/index.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ 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 518939b80..2e6dff1b9 100644 --- a/google/firestore/admin/v1beta1/location.proto +++ b/google/firestore/admin/v1beta1/location.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.admin.v1beta1; -import "google/api/annotations.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta1;admin"; @@ -27,6 +27,8 @@ 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 {} + +// 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 fd9409f21..8b2599caf 100644 --- a/google/firestore/admin/v1beta2/field.proto +++ b/google/firestore/admin/v1beta2/field.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.admin.v1beta2; -import "google/api/annotations.proto"; import "google/firestore/admin/v1beta2/index.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; @@ -27,6 +27,7 @@ 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 diff --git a/google/firestore/admin/v1beta2/firestore_admin.proto b/google/firestore/admin/v1beta2/firestore_admin.proto index c45bd8450..a1ec525c6 100644 --- a/google/firestore/admin/v1beta2/firestore_admin.proto +++ b/google/firestore/admin/v1beta2/firestore_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,14 +31,13 @@ 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 { - // 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]. + // 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]. rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/indexes" @@ -76,16 +75,13 @@ service FirestoreAdmin { // Updates a field configuration. Currently, field updates apply only to // single field index configuration. However, calls to - // [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField] - // should provide a field mask to avoid changing any configuration that the - // caller isn't aware of. The field mask should be specified as: `{ paths: - // "index_config" }`. + // [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField] should provide a field mask to avoid + // changing any configuration that the caller isn't aware of. The field mask + // should be specified as: `{ paths: "index_config" }`. // - // This call returns a - // [google.longrunning.Operation][google.longrunning.Operation] which may be - // used to track the status of the field update. The metadata for the - // operation will be the type - // [FieldOperationMetadata][google.firestore.admin.v1beta2.FieldOperationMetadata]. + // This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + // track the status of the field update. The metadata for + // the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1beta2.FieldOperationMetadata]. // // To configure the default field settings for the database, use // the special `Field` with resource name: @@ -99,12 +95,10 @@ service FirestoreAdmin { // Lists the field configuration and metadata for this database. // - // Currently, - // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] - // only supports listing fields that have been explicitly overridden. To issue - // this query, call - // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] - // with the filter set to `indexConfig.usesAncestorConfig:false`. + // Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse) { option (google.api.http) = { get: "/v1beta2/{parent=projects/*/databases/*/collectionGroups/*}/fields" @@ -119,8 +113,7 @@ service FirestoreAdmin { // used once the associated operation is done. If an export operation is // cancelled before completion it may leave partial data behind in Google // Cloud Storage. - rpc ExportDocuments(ExportDocumentsRequest) - returns (google.longrunning.Operation) { + rpc ExportDocuments(ExportDocumentsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/{name=projects/*/databases/*}:exportDocuments" body: "*" @@ -132,8 +125,7 @@ service FirestoreAdmin { // progress can be monitored and managed via the Operation resource that is // created. If an ImportDocuments operation is cancelled, it is possible // that a subset of the data has already been imported to Cloud Firestore. - rpc ImportDocuments(ImportDocumentsRequest) - returns (google.longrunning.Operation) { + rpc ImportDocuments(ImportDocumentsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/{name=projects/*/databases/*}:importDocuments" body: "*" @@ -141,8 +133,7 @@ service FirestoreAdmin { } } -// The request for -// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex]. +// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex]. message CreateIndexRequest { // A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -152,8 +143,7 @@ message CreateIndexRequest { Index index = 2; } -// The request for -// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes]. +// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes]. message ListIndexesRequest { // A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -166,13 +156,12 @@ message ListIndexesRequest { int32 page_size = 3; // A page token, returned from a previous call to - // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes], - // that may be used to get the next page of results. + // [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes], that may be used to get the next + // page of results. string page_token = 4; } -// The response for -// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes]. +// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta2.FirestoreAdmin.ListIndexes]. message ListIndexesResponse { // The requested indexes. repeated Index indexes = 1; @@ -182,24 +171,21 @@ message ListIndexesResponse { string next_page_token = 2; } -// The request for -// [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta2.FirestoreAdmin.GetIndex]. +// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta2.FirestoreAdmin.GetIndex]. message GetIndexRequest { // A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` string name = 1; } -// The request for -// [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta2.FirestoreAdmin.DeleteIndex]. +// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta2.FirestoreAdmin.DeleteIndex]. message DeleteIndexRequest { // A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` string name = 1; } -// The request for -// [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField]. +// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField]. message UpdateFieldRequest { // The field to be updated. Field field = 1; @@ -209,40 +195,36 @@ message UpdateFieldRequest { google.protobuf.FieldMask update_mask = 2; } -// The request for -// [FirestoreAdmin.GetField][google.firestore.admin.v1beta2.FirestoreAdmin.GetField]. +// The request for [FirestoreAdmin.GetField][google.firestore.admin.v1beta2.FirestoreAdmin.GetField]. message GetFieldRequest { // A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` string name = 1; } -// The request for -// [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields]. +// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields]. message ListFieldsRequest { // A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` string parent = 1; // The filter to apply to list results. Currently, - // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] - // only supports listing fields that have been explicitly overridden. To issue - // this query, call - // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] - // with the filter set to `indexConfig.usesAncestorConfig:false`. + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] only supports listing fields + // that have been explicitly overridden. To issue this query, call + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields] with the filter set to + // `indexConfig.usesAncestorConfig:false`. string filter = 2; // The number of results to return. int32 page_size = 3; // A page token, returned from a previous call to - // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields], - // that may be used to get the next page of results. + // [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields], that may be used to get the next + // page of results. string page_token = 4; } -// The response for -// [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields]. +// The response for [FirestoreAdmin.ListFields][google.firestore.admin.v1beta2.FirestoreAdmin.ListFields]. message ListFieldsResponse { // The requested fields. repeated Field fields = 1; @@ -252,8 +234,7 @@ message ListFieldsResponse { string next_page_token = 2; } -// The request for -// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments]. +// The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments]. message ExportDocumentsRequest { // Database to export. Should be of the form: // `projects/{project_id}/databases/{database_id}`. @@ -273,8 +254,7 @@ message ExportDocumentsRequest { string output_uri_prefix = 3; } -// The request for -// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments]. +// The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments]. message ImportDocumentsRequest { // Database to import into. Should be of the form: // `projects/{project_id}/databases/{database_id}`. diff --git a/google/firestore/admin/v1beta2/index.proto b/google/firestore/admin/v1beta2/index.proto index 2c25371be..d6c738d87 100644 --- a/google/firestore/admin/v1beta2/index.proto +++ b/google/firestore/admin/v1beta2/index.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ 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 { diff --git a/google/firestore/admin/v1beta2/operation.proto b/google/firestore/admin/v1beta2/operation.proto index 24d73aeb7..871f1c16f 100644 --- a/google/firestore/admin/v1beta2/operation.proto +++ b/google/firestore/admin/v1beta2/operation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ syntax = "proto3"; package google.firestore.admin.v1beta2; -import "google/api/annotations.proto"; import "google/firestore/admin/v1beta2/index.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin"; @@ -28,8 +28,8 @@ 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 + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex]. message IndexOperationMetadata { // The time this operation started. @@ -53,8 +53,7 @@ message IndexOperationMetadata { Progress progress_bytes = 6; } -// Metadata for [google.longrunning.Operation][google.longrunning.Operation] -// results from +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField]. message FieldOperationMetadata { // Information about an index configuration change. @@ -89,9 +88,8 @@ message FieldOperationMetadata { // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` string field = 3; - // A list of - // [IndexConfigDelta][google.firestore.admin.v1beta2.FieldOperationMetadata.IndexConfigDelta], - // which describe the intent of this operation. + // A list of [IndexConfigDelta][google.firestore.admin.v1beta2.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + // operation. repeated IndexConfigDelta index_config_deltas = 4; // The state of the operation. @@ -104,8 +102,7 @@ message FieldOperationMetadata { Progress bytes_progress = 7; } -// Metadata for [google.longrunning.Operation][google.longrunning.Operation] -// results from +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments]. message ExportDocumentsMetadata { // The time this operation started. @@ -131,8 +128,7 @@ message ExportDocumentsMetadata { string output_uri_prefix = 7; } -// Metadata for [google.longrunning.Operation][google.longrunning.Operation] -// results from +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from // [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments]. message ImportDocumentsMetadata { // The time this operation started. @@ -158,8 +154,7 @@ message ImportDocumentsMetadata { string input_uri_prefix = 7; } -// Returned in the [google.longrunning.Operation][google.longrunning.Operation] -// response field. +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field. message ExportDocumentsResponse { // Location of the output files. This can be used to begin an import // into Cloud Firestore (this project or another project) after the operation @@ -167,17 +162,6 @@ 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.v1beta2.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. @@ -206,3 +190,14 @@ 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.v1beta2.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/v1/common.proto b/google/firestore/v1/common.proto index 9a0ae7dea..59c62997a 100644 --- a/google/firestore/v1/common.proto +++ b/google/firestore/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -28,16 +28,15 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A set of field paths on a document. // Used to restrict a get or update operation on a document to a subset of its // fields. // This is different from standard field masks, as this is always scoped to a -// [Document][google.firestore.v1.Document], and takes in account the dynamic -// nature of [Value][google.firestore.v1.Value]. +// [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. message DocumentMask { - // The list of field paths in the mask. See - // [Document.fields][google.firestore.v1.Document.fields] for a field path - // syntax reference. + // The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + // path syntax reference. repeated string field_paths = 1; } diff --git a/google/firestore/v1/document.proto b/google/firestore/v1/document.proto index 20e30651c..d3d9c11c7 100644 --- a/google/firestore/v1/document.proto +++ b/google/firestore/v1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A Firestore document. // // Must not exceed 1 MiB - 4 bytes. diff --git a/google/firestore/v1/firestore.proto b/google/firestore/v1/firestore.proto index 49d22a449..5dc9667e2 100644 --- a/google/firestore/v1/firestore.proto +++ b/google/firestore/v1/firestore.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ option java_outer_classname = "FirestoreProto"; option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; - // Specification of the Firestore API. // The Cloud Firestore service. @@ -94,8 +93,7 @@ service Firestore { // // Documents returned by this method are not guaranteed to be returned in the // same order that they were requested. - rpc BatchGetDocuments(BatchGetDocumentsRequest) - returns (stream BatchGetDocumentsResponse) { + rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { option (google.api.http) = { post: "/v1/{database=projects/*/databases/*}/documents:batchGet" body: "*" @@ -103,8 +101,7 @@ service Firestore { } // Starts a new transaction. - rpc BeginTransaction(BeginTransactionRequest) - returns (BeginTransactionResponse) { + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { option (google.api.http) = { post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" @@ -156,8 +153,7 @@ service Firestore { } // Lists all the collection IDs underneath a document. - rpc ListCollectionIds(ListCollectionIdsRequest) - returns (ListCollectionIdsResponse) { + rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" @@ -169,8 +165,7 @@ service Firestore { } } -// The request for -// [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. +// The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. message GetDocumentRequest { // The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -194,8 +189,7 @@ message GetDocumentRequest { } } -// The request for -// [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +// The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -237,17 +231,15 @@ message ListDocumentsRequest { // If the list should show missing documents. A missing document is a // document that does not exist but has sub-documents. These documents will - // be returned with a key but will not have fields, - // [Document.create_time][google.firestore.v1.Document.create_time], or - // [Document.update_time][google.firestore.v1.Document.update_time] set. + // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + // or [Document.update_time][google.firestore.v1.Document.update_time] set. // // Requests with `show_missing` may not specify `where` or // `order_by`. bool show_missing = 12; } -// The response for -// [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +// The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsResponse { // The Documents found. repeated Document documents = 1; @@ -256,8 +248,7 @@ message ListDocumentsResponse { string next_page_token = 2; } -// The request for -// [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. +// The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. message CreateDocumentRequest { // The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or @@ -282,8 +273,7 @@ message CreateDocumentRequest { DocumentMask mask = 5; } -// The request for -// [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. +// The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. message UpdateDocumentRequest { // The updated document. // Creates the document if it does not already exist. @@ -309,8 +299,7 @@ message UpdateDocumentRequest { Precondition current_document = 4; } -// The request for -// [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. +// The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. message DeleteDocumentRequest { // The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -321,8 +310,7 @@ message DeleteDocumentRequest { Precondition current_document = 2; } -// The request for -// [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +// The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -358,8 +346,7 @@ message BatchGetDocumentsRequest { } } -// The streamed response for -// [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsResponse { // A single result. // This can be empty if the server is just returning a transaction. @@ -374,8 +361,7 @@ message BatchGetDocumentsResponse { // The transaction that was started as part of this request. // Will only be set in the first response, and only if - // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - // was set in the request. + // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. bytes transaction = 3; // The time at which the document was read. @@ -385,8 +371,7 @@ message BatchGetDocumentsResponse { google.protobuf.Timestamp read_time = 4; } -// The request for -// [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +// The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -397,8 +382,7 @@ message BeginTransactionRequest { TransactionOptions options = 2; } -// The response for -// [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +// The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionResponse { // The transaction that was started. bytes transaction = 1; @@ -475,14 +459,12 @@ message RunQueryRequest { } } -// The response for -// [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. +// The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. message RunQueryResponse { // The transaction that was started as part of this request. // Can only be set in the first response, and only if - // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - // was set in the request. If set, no other fields will be set in this - // response. + // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + // If set, no other fields will be set in this response. bytes transaction = 2; // A query result. @@ -535,9 +517,9 @@ message WriteRequest { // A stream token that was previously sent by the server. // // The client should set this field to the token from the most recent - // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - // acknowledges that the client has received responses up to this token. After - // sending this token, earlier tokens may not be used anymore. + // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + // received responses up to this token. After sending this token, earlier + // tokens may not be used anymore. // // The server may close the stream if there are too many unacknowledged // responses. @@ -606,8 +588,8 @@ message ListenResponse { // A [Document][google.firestore.v1.Document] has been deleted. DocumentDelete document_delete = 4; - // A [Document][google.firestore.v1.Document] has been removed from a target - // (because it is no longer relevant to that target). + // A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer + // relevant to that target). DocumentRemove document_remove = 6; // A filter to apply to the set of documents previously returned for the @@ -661,8 +643,7 @@ message Target { // If not specified, all matching Documents are returned before any // subsequent changes. oneof resume_type { - // A resume token from a prior - // [TargetChange][google.firestore.v1.TargetChange] for an identical target. + // A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. // // Using a resume token with a different target is unsupported and may fail. bytes resume_token = 4; @@ -754,8 +735,7 @@ message TargetChange { google.protobuf.Timestamp read_time = 6; } -// The request for -// [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +// The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { // The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -771,8 +751,7 @@ message ListCollectionIdsRequest { string page_token = 3; } -// The response from -// [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +// The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsResponse { // The collection ids. repeated string collection_ids = 1; diff --git a/google/firestore/v1/query.proto b/google/firestore/v1/query.proto index a2b4c10fc..48684c060 100644 --- a/google/firestore/v1/query.proto +++ b/google/firestore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/firestore/v1/document.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -29,6 +29,7 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A Firestore query. message StructuredQuery { // A selection of a collection, such as `messages as m1`. @@ -138,6 +139,11 @@ message StructuredQuery { } } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + // An order on a field. message Order { // The field to order by. @@ -147,11 +153,6 @@ message StructuredQuery { Direction direction = 2; } - // A reference to a field, such as `max(messages.time) as max_time`. - message FieldReference { - string field_path = 2; - } - // The projection of document's fields to return. message Projection { // The fields to return. diff --git a/google/firestore/v1/write.proto b/google/firestore/v1/write.proto index 3cd879a18..4ab5d833e 100644 --- a/google/firestore/v1/write.proto +++ b/google/firestore/v1/write.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1; -import "google/api/annotations.proto"; import "google/firestore/v1/common.proto"; import "google/firestore/v1/document.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1"; + // A write on a document. message Write { // The operation to execute. @@ -80,9 +81,8 @@ message DocumentTransform { REQUEST_TIME = 1; } - // The path of the field. See - // [Document.fields][google.firestore.v1.Document.fields] for the field path - // syntax reference. + // The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + // reference. string field_path = 1; // The transformation to apply on the field. @@ -176,20 +176,18 @@ message WriteResult { // previous update_time. google.protobuf.Timestamp update_time = 1; - // The results of applying each - // [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - // in the same order. + // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + // same order. repeated Value transform_results = 2; } // A [Document][google.firestore.v1.Document] has changed. // -// May be the result of multiple [writes][google.firestore.v1.Write], including -// deletes, that ultimately resulted in a new value for the -// [Document][google.firestore.v1.Document]. +// May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that +// ultimately resulted in a new value for the [Document][google.firestore.v1.Document]. // -// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be -// returned for the same logical change, if multiple targets are affected. +// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical +// change, if multiple targets are affected. message DocumentChange { // The new state of the [Document][google.firestore.v1.Document]. // @@ -205,15 +203,13 @@ message DocumentChange { // A [Document][google.firestore.v1.Document] has been deleted. // -// May be the result of multiple [writes][google.firestore.v1.Write], including -// updates, the last of which deleted the -// [Document][google.firestore.v1.Document]. +// May be the result of multiple [writes][google.firestore.v1.Write], including updates, the +// last of which deleted the [Document][google.firestore.v1.Document]. // -// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be -// returned for the same logical delete, if multiple targets are affected. +// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical +// delete, if multiple targets are affected. message DocumentDelete { - // The resource name of the [Document][google.firestore.v1.Document] that was - // deleted. + // The resource name of the [Document][google.firestore.v1.Document] that was deleted. string document = 1; // A set of target IDs for targets that previously matched this entity. @@ -225,19 +221,16 @@ message DocumentDelete { google.protobuf.Timestamp read_time = 4; } -// A [Document][google.firestore.v1.Document] has been removed from the view of -// the targets. +// A [Document][google.firestore.v1.Document] has been removed from the view of the targets. // // Sent if the document is no longer relevant to a target and is out of view. // Can be sent instead of a DocumentDelete or a DocumentChange if the server // can not send the new value of the document. // -// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be -// returned for the same logical write or delete, if multiple targets are -// affected. +// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical +// write or delete, if multiple targets are affected. message DocumentRemove { - // The resource name of the [Document][google.firestore.v1.Document] that has - // gone out of view. + // The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. string document = 1; // A set of target IDs for targets that previously matched this document. @@ -254,8 +247,7 @@ message ExistenceFilter { // The target ID to which this filter applies. int32 target_id = 1; - // The total count of documents that match - // [target_id][google.firestore.v1.ExistenceFilter.target_id]. + // The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. // // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. diff --git a/google/firestore/v1beta1/common.proto b/google/firestore/v1beta1/common.proto index 027b1a09b..87c88a3be 100644 --- a/google/firestore/v1beta1/common.proto +++ b/google/firestore/v1beta1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -28,15 +28,14 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A set of field paths on a document. // Used to restrict a get or update operation on a document to a subset of its // fields. // This is different from standard field masks, as this is always scoped to a -// [Document][google.firestore.v1beta1.Document], and takes in account the -// dynamic nature of [Value][google.firestore.v1beta1.Value]. +// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value]. message DocumentMask { - // The list of field paths in the mask. See - // [Document.fields][google.firestore.v1beta1.Document.fields] for a field + // The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field // path syntax reference. repeated string field_paths = 1; } diff --git a/google/firestore/v1beta1/document.proto b/google/firestore/v1beta1/document.proto index 0e11eff0b..8a043df59 100644 --- a/google/firestore/v1beta1/document.proto +++ b/google/firestore/v1beta1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/type/latlng.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A Firestore document. // // Must not exceed 1 MiB - 4 bytes. diff --git a/google/firestore/v1beta1/firestore.proto b/google/firestore/v1beta1/firestore.proto index dc310d70b..b7ba79075 100644 --- a/google/firestore/v1beta1/firestore.proto +++ b/google/firestore/v1beta1/firestore.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ option java_outer_classname = "FirestoreProto"; option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // Specification of the Firestore API. // The Cloud Firestore service. @@ -94,8 +93,7 @@ service Firestore { // // Documents returned by this method are not guaranteed to be returned in the // same order that they were requested. - rpc BatchGetDocuments(BatchGetDocumentsRequest) - returns (stream BatchGetDocumentsResponse) { + rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" body: "*" @@ -103,8 +101,7 @@ service Firestore { } // Starts a new transaction. - rpc BeginTransaction(BeginTransactionRequest) - returns (BeginTransactionResponse) { + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" @@ -156,8 +153,7 @@ service Firestore { } // Lists all the collection IDs underneath a document. - rpc ListCollectionIds(ListCollectionIdsRequest) - returns (ListCollectionIdsResponse) { + rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" @@ -169,8 +165,7 @@ service Firestore { } } -// The request for -// [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. +// The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. message GetDocumentRequest { // The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -194,8 +189,7 @@ message GetDocumentRequest { } } -// The request for -// [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. +// The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. message ListDocumentsRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -237,17 +231,15 @@ message ListDocumentsRequest { // If the list should show missing documents. A missing document is a // document that does not exist but has sub-documents. These documents will - // be returned with a key but will not have fields, - // [Document.create_time][google.firestore.v1beta1.Document.create_time], or - // [Document.update_time][google.firestore.v1beta1.Document.update_time] set. + // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time], + // or [Document.update_time][google.firestore.v1beta1.Document.update_time] set. // // Requests with `show_missing` may not specify `where` or // `order_by`. bool show_missing = 12; } -// The response for -// [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. +// The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. message ListDocumentsResponse { // The Documents found. repeated Document documents = 1; @@ -256,8 +248,7 @@ message ListDocumentsResponse { string next_page_token = 2; } -// The request for -// [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. +// The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. message CreateDocumentRequest { // The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or @@ -282,8 +273,7 @@ message CreateDocumentRequest { DocumentMask mask = 5; } -// The request for -// [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. +// The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. message UpdateDocumentRequest { // The updated document. // Creates the document if it does not already exist. @@ -309,8 +299,7 @@ message UpdateDocumentRequest { Precondition current_document = 4; } -// The request for -// [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. +// The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. message DeleteDocumentRequest { // The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -321,8 +310,7 @@ message DeleteDocumentRequest { Precondition current_document = 2; } -// The request for -// [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. +// The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -358,8 +346,7 @@ message BatchGetDocumentsRequest { } } -// The streamed response for -// [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. +// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. message BatchGetDocumentsResponse { // A single result. // This can be empty if the server is just returning a transaction. @@ -374,8 +361,7 @@ message BatchGetDocumentsResponse { // The transaction that was started as part of this request. // Will only be set in the first response, and only if - // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] - // was set in the request. + // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request. bytes transaction = 3; // The time at which the document was read. @@ -385,8 +371,7 @@ message BatchGetDocumentsResponse { google.protobuf.Timestamp read_time = 4; } -// The request for -// [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. +// The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. message BeginTransactionRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -397,15 +382,13 @@ message BeginTransactionRequest { TransactionOptions options = 2; } -// The response for -// [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. +// The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. message BeginTransactionResponse { // The transaction that was started. bytes transaction = 1; } -// The request for -// [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. +// The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. message CommitRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -420,8 +403,7 @@ message CommitRequest { bytes transaction = 3; } -// The response for -// [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. +// The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. message CommitResponse { // The result of applying the writes. // @@ -433,8 +415,7 @@ message CommitResponse { google.protobuf.Timestamp commit_time = 2; } -// The request for -// [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. +// The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. message RollbackRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -444,8 +425,7 @@ message RollbackRequest { bytes transaction = 2; } -// The request for -// [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. +// The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. message RunQueryRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -479,14 +459,12 @@ message RunQueryRequest { } } -// The response for -// [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. +// The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. message RunQueryResponse { // The transaction that was started as part of this request. // Can only be set in the first response, and only if - // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] - // was set in the request. If set, no other fields will be set in this - // response. + // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request. + // If set, no other fields will be set in this response. bytes transaction = 2; // A query result. @@ -539,9 +517,9 @@ message WriteRequest { // A stream token that was previously sent by the server. // // The client should set this field to the token from the most recent - // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. - // This acknowledges that the client has received responses up to this token. - // After sending this token, earlier tokens may not be used anymore. + // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has + // received responses up to this token. After sending this token, earlier + // tokens may not be used anymore. // // The server may close the stream if there are too many unacknowledged // responses. @@ -597,8 +575,7 @@ message ListenRequest { map<string, string> labels = 4; } -// The response for -// [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]. +// The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]. message ListenResponse { // The supported responses. oneof response_type { @@ -611,8 +588,8 @@ message ListenResponse { // A [Document][google.firestore.v1beta1.Document] has been deleted. DocumentDelete document_delete = 4; - // A [Document][google.firestore.v1beta1.Document] has been removed from a - // target (because it is no longer relevant to that target). + // A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer + // relevant to that target). DocumentRemove document_remove = 6; // A filter to apply to the set of documents previously returned for the @@ -666,9 +643,7 @@ message Target { // If not specified, all matching Documents are returned before any // subsequent changes. oneof resume_type { - // A resume token from a prior - // [TargetChange][google.firestore.v1beta1.TargetChange] for an identical - // target. + // A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target. // // Using a resume token with a different target is unsupported and may fail. bytes resume_token = 4; @@ -760,8 +735,7 @@ message TargetChange { google.protobuf.Timestamp read_time = 6; } -// The request for -// [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. +// The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { // The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -777,8 +751,7 @@ message ListCollectionIdsRequest { string page_token = 3; } -// The response from -// [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. +// The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. message ListCollectionIdsResponse { // The collection ids. repeated string collection_ids = 1; diff --git a/google/firestore/v1beta1/query.proto b/google/firestore/v1beta1/query.proto index 9bd0ad509..94eec9cbb 100644 --- a/google/firestore/v1beta1/query.proto +++ b/google/firestore/v1beta1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/firestore/v1beta1/document.proto"; import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -29,6 +29,7 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A Firestore query. message StructuredQuery { // A selection of a collection, such as `messages as m1`. @@ -114,6 +115,15 @@ message StructuredQuery { Value value = 3; } + // The projection of document's fields to return. + message Projection { + // The fields to return. + // + // If empty, all fields are returned. To only return the name + // of the document, use `['__name__']`. + repeated FieldReference fields = 2; + } + // A filter with a single operand. message UnaryFilter { // A unary operator. @@ -147,20 +157,6 @@ message StructuredQuery { Direction direction = 2; } - // A reference to a field, such as `max(messages.time) as max_time`. - message FieldReference { - string field_path = 2; - } - - // The projection of document's fields to return. - message Projection { - // The fields to return. - // - // If empty, all fields are returned. To only return the name - // of the document, use `['__name__']`. - repeated FieldReference fields = 2; - } - // A sort direction. enum Direction { // Unspecified. @@ -173,6 +169,11 @@ message StructuredQuery { DESCENDING = 2; } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + // The projection to return. Projection select = 1; diff --git a/google/firestore/v1beta1/write.proto b/google/firestore/v1beta1/write.proto index d1ee7d32f..4e58cc121 100644 --- a/google/firestore/v1beta1/write.proto +++ b/google/firestore/v1beta1/write.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ syntax = "proto3"; package google.firestore.v1beta1; -import "google/api/annotations.proto"; import "google/firestore/v1beta1/common.proto"; import "google/firestore/v1beta1/document.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; @@ -30,6 +30,7 @@ option java_package = "com.google.firestore.v1beta1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; + // A write on a document. message Write { // The operation to execute. @@ -80,9 +81,8 @@ message DocumentTransform { REQUEST_TIME = 1; } - // The path of the field. See - // [Document.fields][google.firestore.v1beta1.Document.fields] for the field - // path syntax reference. + // The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax + // reference. string field_path = 1; // The transformation to apply on the field. @@ -176,21 +176,18 @@ message WriteResult { // previous update_time. google.protobuf.Timestamp update_time = 1; - // The results of applying each - // [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], - // in the same order. + // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the + // same order. repeated Value transform_results = 2; } // A [Document][google.firestore.v1beta1.Document] has changed. // -// May be the result of multiple [writes][google.firestore.v1beta1.Write], -// including deletes, that ultimately resulted in a new value for the -// [Document][google.firestore.v1beta1.Document]. +// May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that +// ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document]. // -// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages -// may be returned for the same logical change, if multiple targets are -// affected. +// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical +// change, if multiple targets are affected. message DocumentChange { // The new state of the [Document][google.firestore.v1beta1.Document]. // @@ -206,16 +203,13 @@ message DocumentChange { // A [Document][google.firestore.v1beta1.Document] has been deleted. // -// May be the result of multiple [writes][google.firestore.v1beta1.Write], -// including updates, the last of which deleted the -// [Document][google.firestore.v1beta1.Document]. +// May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the +// last of which deleted the [Document][google.firestore.v1beta1.Document]. // -// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages -// may be returned for the same logical delete, if multiple targets are -// affected. +// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical +// delete, if multiple targets are affected. message DocumentDelete { - // The resource name of the [Document][google.firestore.v1beta1.Document] that - // was deleted. + // The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. string document = 1; // A set of target IDs for targets that previously matched this entity. @@ -227,19 +221,16 @@ message DocumentDelete { google.protobuf.Timestamp read_time = 4; } -// A [Document][google.firestore.v1beta1.Document] has been removed from the -// view of the targets. +// A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets. // // Sent if the document is no longer relevant to a target and is out of view. // Can be sent instead of a DocumentDelete or a DocumentChange if the server // can not send the new value of the document. // -// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages -// may be returned for the same logical write or delete, if multiple targets are -// affected. +// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical +// write or delete, if multiple targets are affected. message DocumentRemove { - // The resource name of the [Document][google.firestore.v1beta1.Document] that - // has gone out of view. + // The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. string document = 1; // A set of target IDs for targets that previously matched this document. @@ -256,8 +247,7 @@ message ExistenceFilter { // The target ID to which this filter applies. int32 target_id = 1; - // The total count of documents that match - // [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. + // The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. // // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. |