From 533aade3272f07b39bbad2c32a5d9669fde6de53 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Mon, 7 Feb 2022 08:21:18 -0800 Subject: [PATCH] feat: update client libraries to support Database operations (#1676) --- dev/protos/admin_v1.json | 2282 +++++++++++++++++ dev/protos/firestore_admin_v1_proto_api.d.ts | 2 +- dev/protos/firestore_admin_v1_proto_api.js | 2 +- dev/protos/firestore_v1_proto_api.d.ts | 2 +- dev/protos/firestore_v1_proto_api.js | 2 +- dev/protos/firestore_v1beta1_proto_api.d.ts | 2 +- dev/protos/firestore_v1beta1_proto_api.js | 2 +- dev/src/v1/firestore_admin_client.ts | 2 +- dev/src/v1/firestore_client.ts | 4 +- dev/src/v1beta1/firestore_client.ts | 4 +- dev/test/gapic_firestore_v1.ts | 16 +- dev/test/gapic_firestore_v1beta1.ts | 16 +- owlbot.py | 1 + .../protos/firestore_admin_v1_proto_api.d.ts | 354 ++- types/protos/firestore_v1_proto_api.d.ts | 2 +- types/protos/firestore_v1beta1_proto_api.d.ts | 2 +- types/v1/firestore_admin_client.d.ts | 225 +- 17 files changed, 2871 insertions(+), 49 deletions(-) create mode 100644 dev/protos/admin_v1.json diff --git a/dev/protos/admin_v1.json b/dev/protos/admin_v1.json new file mode 100644 index 000000000..6afca9d22 --- /dev/null +++ b/dev/protos/admin_v1.json @@ -0,0 +1,2282 @@ +{ + "nested": { + "google": { + "nested": { + "firestore": { + "nested": { + "admin": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Firestore.Admin.V1", + "go_package": "google.golang.org/genproto/googleapis/firestore/admin/v1;admin", + "java_multiple_files": true, + "java_outer_classname": "OperationProto", + "java_package": "com.google.firestore.admin.v1", + "objc_class_prefix": "GCFS", + "php_namespace": "Google\\Cloud\\Firestore\\Admin\\V1", + "ruby_package": "Google::Cloud::Firestore::Admin::V1", + "(google.api.resource_definition).type": "firestore.googleapis.com/CollectionGroup", + "(google.api.resource_definition).pattern": "projects/{project}/databases/{database}/collectionGroups/{collection}" + }, + "nested": { + "Database": { + "options": { + "(google.api.resource).type": "firestore.googleapis.com/Database", + "(google.api.resource).pattern": "projects/{project}/databases/{database}", + "(google.api.resource).style": "DECLARATIVE_FRIENDLY" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "locationId": { + "type": "string", + "id": 9 + }, + "type": { + "type": "DatabaseType", + "id": 10 + }, + "concurrencyMode": { + "type": "ConcurrencyMode", + "id": 15 + }, + "etag": { + "type": "string", + "id": 99 + } + }, + "nested": { + "DatabaseType": { + "values": { + "DATABASE_TYPE_UNSPECIFIED": 0, + "FIRESTORE_NATIVE": 1, + "DATASTORE_MODE": 2 + } + }, + "ConcurrencyMode": { + "values": { + "CONCURRENCY_MODE_UNSPECIFIED": 0, + "OPTIMISTIC": 1, + "PESSIMISTIC": 2, + "OPTIMISTIC_WITH_ENTITY_GROUPS": 3 + } + } + } + }, + "Field": { + "options": { + "(google.api.resource).type": "firestore.googleapis.com/Field", + "(google.api.resource).pattern": "projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "indexConfig": { + "type": "IndexConfig", + "id": 2 + } + }, + "nested": { + "IndexConfig": { + "fields": { + "indexes": { + "rule": "repeated", + "type": "Index", + "id": 1 + }, + "usesAncestorConfig": { + "type": "bool", + "id": 2 + }, + "ancestorField": { + "type": "string", + "id": 3 + }, + "reverting": { + "type": "bool", + "id": 4 + } + } + } + } + }, + "FirestoreAdmin": { + "options": { + "(google.api.default_host)": "firestore.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastore" + }, + "methods": { + "CreateIndex": { + "requestType": "CreateIndexRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes", + "(google.api.http).body": "index", + "(google.api.method_signature)": "parent,index", + "(google.longrunning.operation_info).response_type": "Index", + "(google.longrunning.operation_info).metadata_type": "IndexOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes", + "body": "index" + } + }, + { + "(google.api.method_signature)": "parent,index" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Index", + "metadata_type": "IndexOperationMetadata" + } + } + ] + }, + "ListIndexes": { + "requestType": "ListIndexesRequest", + "responseType": "ListIndexesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetIndex": { + "requestType": "GetIndexRequest", + "responseType": "Index", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteIndex": { + "requestType": "DeleteIndexRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetField": { + "requestType": "GetFieldRequest", + "responseType": "Field", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateField": { + "requestType": "UpdateFieldRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}", + "(google.api.http).body": "field", + "(google.api.method_signature)": "field", + "(google.longrunning.operation_info).response_type": "Field", + "(google.longrunning.operation_info).metadata_type": "FieldOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}", + "body": "field" + } + }, + { + "(google.api.method_signature)": "field" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Field", + "metadata_type": "FieldOperationMetadata" + } + } + ] + }, + "ListFields": { + "requestType": "ListFieldsRequest", + "responseType": "ListFieldsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ExportDocuments": { + "requestType": "ExportDocumentsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/databases/*}:exportDocuments", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "ExportDocumentsResponse", + "(google.longrunning.operation_info).metadata_type": "ExportDocumentsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/databases/*}:exportDocuments", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportDocumentsResponse", + "metadata_type": "ExportDocumentsMetadata" + } + } + ] + }, + "ImportDocuments": { + "requestType": "ImportDocumentsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/databases/*}:importDocuments", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "ImportDocumentsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/databases/*}:importDocuments", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "ImportDocumentsMetadata" + } + } + ] + }, + "GetDatabase": { + "requestType": "GetDatabaseRequest", + "responseType": "Database", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/databases/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/databases/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDatabases": { + "requestType": "ListDatabasesRequest", + "responseType": "ListDatabasesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/databases", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/databases" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateDatabase": { + "requestType": "UpdateDatabaseRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{database.name=projects/*/databases/*}", + "(google.api.http).body": "database", + "(google.api.method_signature)": "database,update_mask", + "(google.longrunning.operation_info).response_type": "Database", + "(google.longrunning.operation_info).metadata_type": "UpdateDatabaseMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{database.name=projects/*/databases/*}", + "body": "database" + } + }, + { + "(google.api.method_signature)": "database,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Database", + "metadata_type": "UpdateDatabaseMetadata" + } + } + ] + } + } + }, + "ListDatabasesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "firestore.googleapis.com/Database" + } + } + } + }, + "ListDatabasesResponse": { + "fields": { + "databases": { + "rule": "repeated", + "type": "Database", + "id": 1 + } + } + }, + "GetDatabaseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/Database" + } + } + } + }, + "UpdateDatabaseRequest": { + "fields": { + "database": { + "type": "Database", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "UpdateDatabaseMetadata": { + "fields": {} + }, + "CreateIndexRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/CollectionGroup" + } + }, + "index": { + "type": "Index", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListIndexesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/CollectionGroup" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListIndexesResponse": { + "fields": { + "indexes": { + "rule": "repeated", + "type": "Index", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetIndexRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/Index" + } + } + } + }, + "DeleteIndexRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/Index" + } + } + } + }, + "UpdateFieldRequest": { + "fields": { + "field": { + "type": "Field", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "GetFieldRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/Field" + } + } + } + }, + "ListFieldsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/CollectionGroup" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListFieldsResponse": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ExportDocumentsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/Database" + } + }, + "collectionIds": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "outputUriPrefix": { + "type": "string", + "id": 3 + } + } + }, + "ImportDocumentsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "firestore.googleapis.com/Database" + } + }, + "collectionIds": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "inputUriPrefix": { + "type": "string", + "id": 3 + } + } + }, + "Index": { + "options": { + "(google.api.resource).type": "firestore.googleapis.com/Index", + "(google.api.resource).pattern": "projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "queryScope": { + "type": "QueryScope", + "id": 2 + }, + "fields": { + "rule": "repeated", + "type": "IndexField", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + } + }, + "nested": { + "IndexField": { + "oneofs": { + "valueMode": { + "oneof": [ + "order", + "arrayConfig" + ] + } + }, + "fields": { + "fieldPath": { + "type": "string", + "id": 1 + }, + "order": { + "type": "Order", + "id": 2 + }, + "arrayConfig": { + "type": "ArrayConfig", + "id": 3 + } + }, + "nested": { + "Order": { + "values": { + "ORDER_UNSPECIFIED": 0, + "ASCENDING": 1, + "DESCENDING": 2 + } + }, + "ArrayConfig": { + "values": { + "ARRAY_CONFIG_UNSPECIFIED": 0, + "CONTAINS": 1 + } + } + } + }, + "QueryScope": { + "values": { + "QUERY_SCOPE_UNSPECIFIED": 0, + "COLLECTION": 1, + "COLLECTION_GROUP": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "NEEDS_REPAIR": 3 + } + } + } + }, + "LocationMetadata": { + "fields": {} + }, + "IndexOperationMetadata": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "index": { + "type": "string", + "id": 3 + }, + "state": { + "type": "OperationState", + "id": 4 + }, + "progressDocuments": { + "type": "Progress", + "id": 5 + }, + "progressBytes": { + "type": "Progress", + "id": 6 + } + } + }, + "FieldOperationMetadata": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "field": { + "type": "string", + "id": 3 + }, + "indexConfigDeltas": { + "rule": "repeated", + "type": "IndexConfigDelta", + "id": 4 + }, + "state": { + "type": "OperationState", + "id": 5 + }, + "progressDocuments": { + "type": "Progress", + "id": 6 + }, + "progressBytes": { + "type": "Progress", + "id": 7 + } + }, + "nested": { + "IndexConfigDelta": { + "fields": { + "changeType": { + "type": "ChangeType", + "id": 1 + }, + "index": { + "type": "Index", + "id": 2 + } + }, + "nested": { + "ChangeType": { + "values": { + "CHANGE_TYPE_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + }, + "ExportDocumentsMetadata": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "operationState": { + "type": "OperationState", + "id": 3 + }, + "progressDocuments": { + "type": "Progress", + "id": 4 + }, + "progressBytes": { + "type": "Progress", + "id": 5 + }, + "collectionIds": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "outputUriPrefix": { + "type": "string", + "id": 7 + } + } + }, + "ImportDocumentsMetadata": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "operationState": { + "type": "OperationState", + "id": 3 + }, + "progressDocuments": { + "type": "Progress", + "id": 4 + }, + "progressBytes": { + "type": "Progress", + "id": 5 + }, + "collectionIds": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "inputUriPrefix": { + "type": "string", + "id": 7 + } + } + }, + "ExportDocumentsResponse": { + "fields": { + "outputUriPrefix": { + "type": "string", + "id": 1 + } + } + }, + "OperationState": { + "values": { + "OPERATION_STATE_UNSPECIFIED": 0, + "INITIALIZING": 1, + "PROCESSING": 2, + "CANCELLING": 3, + "FINALIZING": 4, + "SUCCESSFUL": 5, + "FAILED": 6, + "CANCELLED": 7 + } + }, + "Progress": { + "fields": { + "estimatedWork": { + "type": "int64", + "id": 1 + }, + "completedWork": { + "type": "int64", + "id": 2 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "selector": { + "type": "string", + "id": 1 + }, + "body": { + "type": "string", + "id": 7 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5 + }, + "serverStreaming": { + "type": "bool", + "id": 6 + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10 + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27 + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16 + }, + "javaGenericServices": { + "type": "bool", + "id": 17 + }, + "pyGenericServices": { + "type": "bool", + "id": 18 + }, + "deprecated": { + "type": "bool", + "id": 23 + }, + "ccEnableArenas": { + "type": "bool", + "id": 31 + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1 + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3 + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5 + }, + "deprecated": { + "type": "bool", + "id": 3 + }, + "weak": { + "type": "bool", + "id": 10 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/latlng;latlng", + "java_multiple_files": true, + "java_outer_classname": "LatLngProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "LatLng": { + "fields": { + "latitude": { + "type": "double", + "id": 1 + }, + "longitude": { + "type": "double", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/dev/protos/firestore_admin_v1_proto_api.d.ts b/dev/protos/firestore_admin_v1_proto_api.d.ts index acb90f931..216fa60d6 100644 --- a/dev/protos/firestore_admin_v1_proto_api.d.ts +++ b/dev/protos/firestore_admin_v1_proto_api.d.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dev/protos/firestore_admin_v1_proto_api.js b/dev/protos/firestore_admin_v1_proto_api.js index d6b06ed31..aafff5e54 100644 --- a/dev/protos/firestore_admin_v1_proto_api.js +++ b/dev/protos/firestore_admin_v1_proto_api.js @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dev/protos/firestore_v1_proto_api.d.ts b/dev/protos/firestore_v1_proto_api.d.ts index 56b3627cc..763e6668e 100644 --- a/dev/protos/firestore_v1_proto_api.d.ts +++ b/dev/protos/firestore_v1_proto_api.d.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dev/protos/firestore_v1_proto_api.js b/dev/protos/firestore_v1_proto_api.js index 9eb210403..a583766dc 100644 --- a/dev/protos/firestore_v1_proto_api.js +++ b/dev/protos/firestore_v1_proto_api.js @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dev/protos/firestore_v1beta1_proto_api.d.ts b/dev/protos/firestore_v1beta1_proto_api.d.ts index 898267f2a..ce9fcaee3 100644 --- a/dev/protos/firestore_v1beta1_proto_api.d.ts +++ b/dev/protos/firestore_v1beta1_proto_api.d.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dev/protos/firestore_v1beta1_proto_api.js b/dev/protos/firestore_v1beta1_proto_api.js index b75dc6656..dbd4a6a3b 100644 --- a/dev/protos/firestore_v1beta1_proto_api.js +++ b/dev/protos/firestore_v1beta1_proto_api.js @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dev/src/v1/firestore_admin_client.ts b/dev/src/v1/firestore_admin_client.ts index 16dc326dd..83b1a71d2 100644 --- a/dev/src/v1/firestore_admin_client.ts +++ b/dev/src/v1/firestore_admin_client.ts @@ -31,7 +31,7 @@ import { import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/firestore_admin_v1_proto_api'; -import jsonProtos = require('../../protos/v1_admin.json'); +import jsonProtos = require('../../protos/admin_v1.json'); /** * Client JSON configuration object, loaded from * `src/v1/firestore_admin_client_config.json`. diff --git a/dev/src/v1/firestore_client.ts b/dev/src/v1/firestore_client.ts index 547d305c5..fbb3ab617 100644 --- a/dev/src/v1/firestore_client.ts +++ b/dev/src/v1/firestore_client.ts @@ -1226,7 +1226,7 @@ export class FirestoreClient { */ write(options?: CallOptions): gax.CancellableStream { this.initialize(); - return this.innerApiCalls.write({}, options); + return this.innerApiCalls.write(null, options); } /** @@ -1246,7 +1246,7 @@ export class FirestoreClient { */ listen(options?: CallOptions): gax.CancellableStream { this.initialize(); - return this.innerApiCalls.listen({}, options); + return this.innerApiCalls.listen(null, options); } /** diff --git a/dev/src/v1beta1/firestore_client.ts b/dev/src/v1beta1/firestore_client.ts index e3710f2b5..d5635d0f9 100644 --- a/dev/src/v1beta1/firestore_client.ts +++ b/dev/src/v1beta1/firestore_client.ts @@ -1243,7 +1243,7 @@ export class FirestoreClient { */ write(options?: CallOptions): gax.CancellableStream { this.initialize(); - return this.innerApiCalls.write({}, options); + return this.innerApiCalls.write(null, options); } /** @@ -1263,7 +1263,7 @@ export class FirestoreClient { */ listen(options?: CallOptions): gax.CancellableStream { this.initialize(); - return this.innerApiCalls.listen({}, options); + return this.innerApiCalls.listen(null, options); } /** diff --git a/dev/test/gapic_firestore_v1.ts b/dev/test/gapic_firestore_v1.ts index 393705808..66022d98c 100644 --- a/dev/test/gapic_firestore_v1.ts +++ b/dev/test/gapic_firestore_v1.ts @@ -1321,9 +1321,7 @@ describe('v1.FirestoreClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.write as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.write as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -1364,9 +1362,7 @@ describe('v1.FirestoreClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.innerApiCalls.write as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.write as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -1407,9 +1403,7 @@ describe('v1.FirestoreClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listen as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.listen as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -1450,9 +1444,7 @@ describe('v1.FirestoreClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.innerApiCalls.listen as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.listen as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) diff --git a/dev/test/gapic_firestore_v1beta1.ts b/dev/test/gapic_firestore_v1beta1.ts index e93719780..16c621e67 100644 --- a/dev/test/gapic_firestore_v1beta1.ts +++ b/dev/test/gapic_firestore_v1beta1.ts @@ -1325,9 +1325,7 @@ describe('v1beta1.FirestoreClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.write as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.write as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -1368,9 +1366,7 @@ describe('v1beta1.FirestoreClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.innerApiCalls.write as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.write as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -1411,9 +1407,7 @@ describe('v1beta1.FirestoreClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listen as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.listen as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -1454,9 +1448,7 @@ describe('v1beta1.FirestoreClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.innerApiCalls.listen as SinonStub) - .getCall(0) - .calledWithExactly({}, undefined) + (client.innerApiCalls.listen as SinonStub).getCall(0).calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) diff --git a/owlbot.py b/owlbot.py index c3ebb0921..07b598f55 100644 --- a/owlbot.py +++ b/owlbot.py @@ -170,6 +170,7 @@ os.chdir("protos") os.unlink('protos.js') os.unlink('protos.d.ts') + os.unlink('protos.json') subprocess.run('./update.sh', shell=True) os.chdir("../../") diff --git a/types/protos/firestore_admin_v1_proto_api.d.ts b/types/protos/firestore_admin_v1_proto_api.d.ts index 50387a415..216fa60d6 100644 --- a/types/protos/firestore_admin_v1_proto_api.d.ts +++ b/types/protos/firestore_admin_v1_proto_api.d.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 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,82 @@ export namespace google { /** Namespace v1. */ namespace v1 { + /** Properties of a Database. */ + interface IDatabase { + + /** Database name */ + name?: (string|null); + + /** Database locationId */ + locationId?: (string|null); + + /** Database type */ + type?: (google.firestore.admin.v1.Database.DatabaseType|null); + + /** Database concurrencyMode */ + concurrencyMode?: (google.firestore.admin.v1.Database.ConcurrencyMode|null); + + /** Database etag */ + etag?: (string|null); + } + + /** Represents a Database. */ + class Database implements IDatabase { + + /** + * Constructs a new Database. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IDatabase); + + /** Database name. */ + public name: string; + + /** Database locationId. */ + public locationId: string; + + /** Database type. */ + public type: google.firestore.admin.v1.Database.DatabaseType; + + /** Database concurrencyMode. */ + public concurrencyMode: google.firestore.admin.v1.Database.ConcurrencyMode; + + /** Database etag. */ + public etag: string; + + /** + * Creates a Database message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Database + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database; + + /** + * Creates a plain object from a Database message. Also converts values to other types if specified. + * @param message Database + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Database to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Database { + + /** DatabaseType enum. */ + type DatabaseType = + "DATABASE_TYPE_UNSPECIFIED"| "FIRESTORE_NATIVE"| "DATASTORE_MODE"; + + /** ConcurrencyMode enum. */ + type ConcurrencyMode = + "CONCURRENCY_MODE_UNSPECIFIED"| "OPTIMISTIC"| "PESSIMISTIC"| "OPTIMISTIC_WITH_ENTITY_GROUPS"; + } + /** Properties of a Field. */ interface IField { @@ -272,6 +348,48 @@ export namespace google { * @returns Promise */ public importDocuments(request: google.firestore.admin.v1.IImportDocumentsRequest): Promise; + + /** + * Calls GetDatabase. + * @param request GetDatabaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Database + */ + public getDatabase(request: google.firestore.admin.v1.IGetDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetDatabaseCallback): void; + + /** + * Calls GetDatabase. + * @param request GetDatabaseRequest message or plain object + * @returns Promise + */ + public getDatabase(request: google.firestore.admin.v1.IGetDatabaseRequest): Promise; + + /** + * Calls ListDatabases. + * @param request ListDatabasesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDatabasesResponse + */ + public listDatabases(request: google.firestore.admin.v1.IListDatabasesRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListDatabasesCallback): void; + + /** + * Calls ListDatabases. + * @param request ListDatabasesRequest message or plain object + * @returns Promise + */ + public listDatabases(request: google.firestore.admin.v1.IListDatabasesRequest): Promise; + + /** + * Calls UpdateDatabase. + * @param request UpdateDatabaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDatabase(request: google.firestore.admin.v1.IUpdateDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.UpdateDatabaseCallback): void; + + /** + * Calls UpdateDatabase. + * @param request UpdateDatabaseRequest message or plain object + * @returns Promise + */ + public updateDatabase(request: google.firestore.admin.v1.IUpdateDatabaseRequest): Promise; } namespace FirestoreAdmin { @@ -338,6 +456,232 @@ export namespace google { * @param [response] Operation */ type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getDatabase}. + * @param error Error, if any + * @param [response] Database + */ + type GetDatabaseCallback = (error: (Error|null), response?: google.firestore.admin.v1.Database) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listDatabases}. + * @param error Error, if any + * @param [response] ListDatabasesResponse + */ + type ListDatabasesCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListDatabasesResponse) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateDatabase}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDatabaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListDatabasesRequest. */ + interface IListDatabasesRequest { + + /** ListDatabasesRequest parent */ + parent?: (string|null); + } + + /** Represents a ListDatabasesRequest. */ + class ListDatabasesRequest implements IListDatabasesRequest { + + /** + * Constructs a new ListDatabasesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListDatabasesRequest); + + /** ListDatabasesRequest parent. */ + public parent: string; + + /** + * Creates a ListDatabasesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDatabasesRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListDatabasesRequest; + + /** + * Creates a plain object from a ListDatabasesRequest message. Also converts values to other types if specified. + * @param message ListDatabasesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListDatabasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDatabasesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDatabasesResponse. */ + interface IListDatabasesResponse { + + /** ListDatabasesResponse databases */ + databases?: (google.firestore.admin.v1.IDatabase[]|null); + } + + /** Represents a ListDatabasesResponse. */ + class ListDatabasesResponse implements IListDatabasesResponse { + + /** + * Constructs a new ListDatabasesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListDatabasesResponse); + + /** ListDatabasesResponse databases. */ + public databases: google.firestore.admin.v1.IDatabase[]; + + /** + * Creates a ListDatabasesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDatabasesResponse + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListDatabasesResponse; + + /** + * Creates a plain object from a ListDatabasesResponse message. Also converts values to other types if specified. + * @param message ListDatabasesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListDatabasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDatabasesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetDatabaseRequest. */ + interface IGetDatabaseRequest { + + /** GetDatabaseRequest name */ + name?: (string|null); + } + + /** Represents a GetDatabaseRequest. */ + class GetDatabaseRequest implements IGetDatabaseRequest { + + /** + * Constructs a new GetDatabaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IGetDatabaseRequest); + + /** GetDatabaseRequest name. */ + public name: string; + + /** + * Creates a GetDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDatabaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetDatabaseRequest; + + /** + * Creates a plain object from a GetDatabaseRequest message. Also converts values to other types if specified. + * @param message GetDatabaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.GetDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDatabaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateDatabaseRequest. */ + interface IUpdateDatabaseRequest { + + /** UpdateDatabaseRequest database */ + database?: (google.firestore.admin.v1.IDatabase|null); + + /** UpdateDatabaseRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDatabaseRequest. */ + class UpdateDatabaseRequest implements IUpdateDatabaseRequest { + + /** + * Constructs a new UpdateDatabaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IUpdateDatabaseRequest); + + /** UpdateDatabaseRequest database. */ + public database?: (google.firestore.admin.v1.IDatabase|null); + + /** UpdateDatabaseRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates an UpdateDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDatabaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateDatabaseRequest; + + /** + * Creates a plain object from an UpdateDatabaseRequest message. Also converts values to other types if specified. + * @param message UpdateDatabaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.UpdateDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDatabaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateDatabaseMetadata. */ + interface IUpdateDatabaseMetadata { + } + + /** Represents an UpdateDatabaseMetadata. */ + class UpdateDatabaseMetadata implements IUpdateDatabaseMetadata { + + /** + * Constructs a new UpdateDatabaseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IUpdateDatabaseMetadata); + + /** + * Creates an UpdateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDatabaseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateDatabaseMetadata; + + /** + * Creates a plain object from an UpdateDatabaseMetadata message. Also converts values to other types if specified. + * @param message UpdateDatabaseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.UpdateDatabaseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDatabaseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } /** Properties of a CreateIndexRequest. */ @@ -1447,6 +1791,10 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** OperationState enum. */ + type OperationState = + "OPERATION_STATE_UNSPECIFIED"| "INITIALIZING"| "PROCESSING"| "CANCELLING"| "FINALIZING"| "SUCCESSFUL"| "FAILED"| "CANCELLED"; + /** Properties of a Progress. */ interface IProgress { @@ -1493,10 +1841,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** OperationState enum. */ - type OperationState = - "OPERATION_STATE_UNSPECIFIED"| "INITIALIZING"| "PROCESSING"| "CANCELLING"| "FINALIZING"| "SUCCESSFUL"| "FAILED"| "CANCELLED"; } } } diff --git a/types/protos/firestore_v1_proto_api.d.ts b/types/protos/firestore_v1_proto_api.d.ts index 56b3627cc..763e6668e 100644 --- a/types/protos/firestore_v1_proto_api.d.ts +++ b/types/protos/firestore_v1_proto_api.d.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/types/protos/firestore_v1beta1_proto_api.d.ts b/types/protos/firestore_v1beta1_proto_api.d.ts index 898267f2a..ce9fcaee3 100644 --- a/types/protos/firestore_v1beta1_proto_api.d.ts +++ b/types/protos/firestore_v1beta1_proto_api.d.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/types/v1/firestore_admin_client.d.ts b/types/v1/firestore_admin_client.d.ts index 118383190..5adbd7881 100644 --- a/types/v1/firestore_admin_client.d.ts +++ b/types/v1/firestore_admin_client.d.ts @@ -27,6 +27,32 @@ import { import {Transform} from 'stream'; import * as protos from '../protos/firestore_admin_v1_proto_api'; /** + * The Cloud Firestore Admin API. + * + * This API provides several administrative services for Cloud Firestore. + * + * Project, Database, Namespace, Collection, Collection Group, and Document are + * used as defined in the Google Cloud Firestore API. + * + * Operation: An Operation represents work being performed in the background. + * + * The index service manages Cloud Firestore indexes. + * + * Index creation is performed asynchronously. + * An Operation resource is created for each such asynchronous operation. + * The state of the operation (including any errors encountered) + * may be queried via the Operation resource. + * + * The Operations collection provides a record of actions performed for the + * specified Project (including any Operations in progress). Operations are not + * created directly but through calls on other collections or resources. + * + * An Operation that is done may be deleted so that it is no longer listed as + * part of the Operation collection. Operations are garbage collected after + * 30 days. By default, ListOperations will only return in progress and failed + * operations. To list completed operation, issue a ListOperations request with + * the filter `done: true`. + * * Operations are created by service `FirestoreAdmin`, but are accessed via * service `google.longrunning.Operations`. * @class @@ -261,6 +287,96 @@ export declare class FirestoreAdminClient { {} | null | undefined > ): void; + /** + * Gets information about a database. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Database]{@link google.firestore.admin.v1.Database}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/firestore_admin.get_database.js + * region_tag:firestore_v1_generated_FirestoreAdmin_GetDatabase_async + */ + getDatabase( + request?: protos.google.firestore.admin.v1.IGetDatabaseRequest, + options?: CallOptions + ): Promise< + [ + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.IGetDatabaseRequest | undefined, + {} | undefined + ] + >; + getDatabase( + request: protos.google.firestore.admin.v1.IGetDatabaseRequest, + options: CallOptions, + callback: Callback< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.IGetDatabaseRequest | null | undefined, + {} | null | undefined + > + ): void; + getDatabase( + request: protos.google.firestore.admin.v1.IGetDatabaseRequest, + callback: Callback< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.IGetDatabaseRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * List all the databases in the project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. A parent name of the form + * `projects/{project_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListDatabasesResponse]{@link google.firestore.admin.v1.ListDatabasesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/firestore_admin.list_databases.js + * region_tag:firestore_v1_generated_FirestoreAdmin_ListDatabases_async + */ + listDatabases( + request?: protos.google.firestore.admin.v1.IListDatabasesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.firestore.admin.v1.IListDatabasesResponse, + protos.google.firestore.admin.v1.IListDatabasesRequest | undefined, + {} | undefined + ] + >; + listDatabases( + request: protos.google.firestore.admin.v1.IListDatabasesRequest, + options: CallOptions, + callback: Callback< + protos.google.firestore.admin.v1.IListDatabasesResponse, + protos.google.firestore.admin.v1.IListDatabasesRequest | null | undefined, + {} | null | undefined + > + ): void; + listDatabases( + request: protos.google.firestore.admin.v1.IListDatabasesRequest, + callback: Callback< + protos.google.firestore.admin.v1.IListDatabasesResponse, + protos.google.firestore.admin.v1.IListDatabasesRequest | null | undefined, + {} | null | undefined + > + ): void; /** * Creates a composite index. This returns a {@link google.longrunning.Operation|google.longrunning.Operation} * which may be used to track the status of the creation. The metadata for @@ -441,6 +557,9 @@ export declare class FirestoreAdminClient { * cancelled before completion it may leave partial data behind in Google * Cloud Storage. * + * For more details on export behavior and output format, refer to: + * https://cloud.google.com/firestore/docs/manage-data/export-import + * * @param {Object} request * The request object that will be sent. * @param {string} request.name @@ -614,6 +733,83 @@ export declare class FirestoreAdminClient { protos.google.firestore.admin.v1.ImportDocumentsMetadata > >; + /** + * Updates a database. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.firestore.admin.v1.Database} request.database + * Required. The database to update. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/firestore_admin.update_database.js + * region_tag:firestore_v1_generated_FirestoreAdmin_UpdateDatabase_async + */ + updateDatabase( + request?: protos.google.firestore.admin.v1.IUpdateDatabaseRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.IUpdateDatabaseMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateDatabase( + request: protos.google.firestore.admin.v1.IUpdateDatabaseRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.IUpdateDatabaseMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDatabase( + request: protos.google.firestore.admin.v1.IUpdateDatabaseRequest, + callback: Callback< + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.IUpdateDatabaseMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Check the status of the long running operation returned by `updateDatabase()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/firestore_admin.update_database.js + * region_tag:firestore_v1_generated_FirestoreAdmin_UpdateDatabase_async + */ + checkUpdateDatabaseProgress( + name: string + ): Promise< + LROperation< + protos.google.firestore.admin.v1.Database, + protos.google.firestore.admin.v1.UpdateDatabaseMetadata + > + >; /** * Lists composite indexes. * @@ -741,7 +937,7 @@ export declare class FirestoreAdminClient { * Currently, {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} only supports listing fields * that have been explicitly overridden. To issue this query, call * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with the filter set to - * `indexConfig.usesAncestorConfig:false`. + * `indexConfig.usesAncestorConfig:false` . * * @param {Object} request * The request object that will be sent. @@ -752,8 +948,8 @@ export declare class FirestoreAdminClient { * The filter to apply to list results. Currently, * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} only supports listing fields * that have been explicitly overridden. To issue this query, call - * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with the filter set to - * `indexConfig.usesAncestorConfig:false`. + * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with a filter that includes + * `indexConfig.usesAncestorConfig:false` . * @param {number} request.pageSize * The number of results to return. * @param {string} request.pageToken @@ -811,8 +1007,8 @@ export declare class FirestoreAdminClient { * The filter to apply to list results. Currently, * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} only supports listing fields * that have been explicitly overridden. To issue this query, call - * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with the filter set to - * `indexConfig.usesAncestorConfig:false`. + * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with a filter that includes + * `indexConfig.usesAncestorConfig:false` . * @param {number} request.pageSize * The number of results to return. * @param {string} request.pageToken @@ -848,8 +1044,8 @@ export declare class FirestoreAdminClient { * The filter to apply to list results. Currently, * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} only supports listing fields * that have been explicitly overridden. To issue this query, call - * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with the filter set to - * `indexConfig.usesAncestorConfig:false`. + * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} with a filter that includes + * `indexConfig.usesAncestorConfig:false` . * @param {number} request.pageSize * The number of results to return. * @param {string} request.pageToken @@ -1034,6 +1230,21 @@ export declare class FirestoreAdminClient { * @returns {string} A string representing the index. */ matchIndexFromIndexName(indexName: string): string | number; + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string): string; + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string): string | number; /** * Terminate the gRPC channel and close the client. *