diff --git a/dev/protos/admin_v1.json b/dev/protos/admin_v1.json index 6afca9d22..764a98236 100644 --- a/dev/protos/admin_v1.json +++ b/dev/protos/admin_v1.json @@ -9,7 +9,7 @@ "v1": { "options": { "csharp_namespace": "Google.Cloud.Firestore.Admin.V1", - "go_package": "google.golang.org/genproto/googleapis/firestore/admin/v1;admin", + "go_package": "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb", "java_multiple_files": true, "java_outer_classname": "OperationProto", "java_package": "com.google.firestore.admin.v1", @@ -43,6 +43,17 @@ "type": "ConcurrencyMode", "id": 15 }, + "appEngineIntegrationMode": { + "type": "AppEngineIntegrationMode", + "id": 19 + }, + "keyPrefix": { + "type": "string", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99 @@ -63,6 +74,13 @@ "PESSIMISTIC": 2, "OPTIMISTIC_WITH_ENTITY_GROUPS": 3 } + }, + "AppEngineIntegrationMode": { + "values": { + "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } } } }, @@ -82,6 +100,10 @@ "indexConfig": { "type": "IndexConfig", "id": 2 + }, + "ttlConfig": { + "type": "TtlConfig", + "id": 3 } }, "nested": { @@ -105,6 +127,27 @@ "id": 4 } } + }, + "TtlConfig": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "NEEDS_REPAIR": 3 + } + } + } } } }, @@ -316,6 +359,34 @@ } ] }, + "CreateDatabase": { + "requestType": "CreateDatabaseRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/databases", + "(google.api.http).body": "database", + "(google.api.method_signature)": "parent,database,database_id", + "(google.longrunning.operation_info).response_type": "Database", + "(google.longrunning.operation_info).metadata_type": "CreateDatabaseMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/databases", + "body": "database" + } + }, + { + "(google.api.method_signature)": "parent,database,database_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Database", + "metadata_type": "CreateDatabaseMetadata" + } + } + ] + }, "GetDatabase": { "requestType": "GetDatabaseRequest", "responseType": "Database", @@ -394,6 +465,35 @@ } } }, + "CreateDatabaseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "firestore.googleapis.com/Database" + } + }, + "database": { + "type": "Database", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "databaseId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateDatabaseMetadata": { + "fields": {} + }, "ListDatabasesResponse": { "fields": { "databases": { @@ -633,6 +733,10 @@ "type": "QueryScope", "id": 2 }, + "apiScope": { + "type": "ApiScope", + "id": 5 + }, "fields": { "rule": "repeated", "type": "IndexField", @@ -644,6 +748,20 @@ } }, "nested": { + "QueryScope": { + "values": { + "QUERY_SCOPE_UNSPECIFIED": 0, + "COLLECTION": 1, + "COLLECTION_GROUP": 2, + "COLLECTION_RECURSIVE": 3 + } + }, + "ApiScope": { + "values": { + "ANY_API": 0, + "DATASTORE_MODE_API": 1 + } + }, "IndexField": { "oneofs": { "valueMode": { @@ -683,13 +801,6 @@ } } }, - "QueryScope": { - "values": { - "QUERY_SCOPE_UNSPECIFIED": 0, - "COLLECTION": 1, - "COLLECTION_GROUP": 2 - } - }, "State": { "values": { "STATE_UNSPECIFIED": 0, @@ -761,6 +872,10 @@ "progressBytes": { "type": "Progress", "id": 7 + }, + "ttlConfigDelta": { + "type": "TtlConfigDelta", + "id": 8 } }, "nested": { @@ -784,6 +899,23 @@ } } } + }, + "TtlConfigDelta": { + "fields": { + "changeType": { + "type": "ChangeType", + "id": 1 + } + }, + "nested": { + "ChangeType": { + "values": { + "CHANGE_TYPE_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } } } }, @@ -996,6 +1128,268 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -1014,6 +1408,18 @@ "NON_EMPTY_DEFAULT": 7 } }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -1094,6 +1500,15 @@ } }, "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, "nested": { "FileDescriptorSet": { "fields": { @@ -2064,7 +2479,7 @@ "options": { "cc_enable_arenas": true, "csharp_namespace": "Google.LongRunning", - "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", diff --git a/dev/protos/firestore_admin_v1_proto_api.d.ts b/dev/protos/firestore_admin_v1_proto_api.d.ts index c5459417a..a7548dc5c 100644 --- a/dev/protos/firestore_admin_v1_proto_api.d.ts +++ b/dev/protos/firestore_admin_v1_proto_api.d.ts @@ -448,6 +448,20 @@ export namespace google { */ public importDocuments(request: google.firestore.admin.v1.IImportDocumentsRequest): Promise; + /** + * Calls CreateDatabase. + * @param request CreateDatabaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDatabase(request: google.firestore.admin.v1.ICreateDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.CreateDatabaseCallback): void; + + /** + * Calls CreateDatabase. + * @param request CreateDatabaseRequest message or plain object + * @returns Promise + */ + public createDatabase(request: google.firestore.admin.v1.ICreateDatabaseRequest): Promise; + /** * Calls GetDatabase. * @param request GetDatabaseRequest message or plain object @@ -556,6 +570,13 @@ export namespace google { */ type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#createDatabase}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDatabaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getDatabase}. * @param error Error, if any @@ -626,6 +647,108 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CreateDatabaseRequest. */ + interface ICreateDatabaseRequest { + + /** CreateDatabaseRequest parent */ + parent?: (string|null); + + /** CreateDatabaseRequest database */ + database?: (google.firestore.admin.v1.IDatabase|null); + + /** CreateDatabaseRequest databaseId */ + databaseId?: (string|null); + } + + /** Represents a CreateDatabaseRequest. */ + class CreateDatabaseRequest implements ICreateDatabaseRequest { + + /** + * Constructs a new CreateDatabaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.ICreateDatabaseRequest); + + /** CreateDatabaseRequest parent. */ + public parent: string; + + /** CreateDatabaseRequest database. */ + public database?: (google.firestore.admin.v1.IDatabase|null); + + /** CreateDatabaseRequest databaseId. */ + public databaseId: string; + + /** + * Creates a CreateDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDatabaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.CreateDatabaseRequest; + + /** + * Creates a plain object from a CreateDatabaseRequest message. Also converts values to other types if specified. + * @param message CreateDatabaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.CreateDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDatabaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDatabaseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDatabaseMetadata. */ + interface ICreateDatabaseMetadata { + } + + /** Represents a CreateDatabaseMetadata. */ + class CreateDatabaseMetadata implements ICreateDatabaseMetadata { + + /** + * Constructs a new CreateDatabaseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.ICreateDatabaseMetadata); + + /** + * Creates a CreateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDatabaseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.CreateDatabaseMetadata; + + /** + * Creates a plain object from a CreateDatabaseMetadata message. Also converts values to other types if specified. + * @param message CreateDatabaseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.CreateDatabaseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDatabaseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDatabaseMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ListDatabasesResponse. */ interface IListDatabasesResponse { @@ -1439,6 +1562,9 @@ export namespace google { /** Index queryScope */ queryScope?: (google.firestore.admin.v1.Index.QueryScope|null); + /** Index apiScope */ + apiScope?: (google.firestore.admin.v1.Index.ApiScope|null); + /** Index fields */ fields?: (google.firestore.admin.v1.Index.IIndexField[]|null); @@ -1461,6 +1587,9 @@ export namespace google { /** Index queryScope. */ public queryScope: google.firestore.admin.v1.Index.QueryScope; + /** Index apiScope. */ + public apiScope: google.firestore.admin.v1.Index.ApiScope; + /** Index fields. */ public fields: google.firestore.admin.v1.Index.IIndexField[]; @@ -1500,7 +1629,11 @@ export namespace google { /** QueryScope enum. */ type QueryScope = - "QUERY_SCOPE_UNSPECIFIED"| "COLLECTION"| "COLLECTION_GROUP"; + "QUERY_SCOPE_UNSPECIFIED"| "COLLECTION"| "COLLECTION_GROUP"| "COLLECTION_RECURSIVE"; + + /** ApiScope enum. */ + type ApiScope = + "ANY_API"| "DATASTORE_MODE_API"; /** Properties of an IndexField. */ interface IIndexField { @@ -2582,6 +2715,9 @@ export namespace google { /** Publishing librarySettings */ librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); } /** Represents a Publishing. */ @@ -2620,6 +2756,9 @@ export namespace google { /** Publishing librarySettings. */ public librarySettings: google.api.IClientLibrarySettings[]; + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + /** * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -2906,6 +3045,21 @@ export namespace google { /** DotnetSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); } /** Represents a DotnetSettings. */ @@ -2920,6 +3074,21 @@ export namespace google { /** DotnetSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + /** * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -3170,7 +3339,7 @@ export namespace google { /** ClientLibraryOrganization enum. */ type ClientLibraryOrganization = - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"| "CLOUD"| "ADS"| "PHOTOS"| "STREET_VIEW"; + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"| "CLOUD"| "ADS"| "PHOTOS"| "STREET_VIEW"| "SHOPPING"| "GEO"| "GENERATIVE_AI"; /** ClientLibraryDestination enum. */ type ClientLibraryDestination = diff --git a/dev/protos/firestore_admin_v1_proto_api.js b/dev/protos/firestore_admin_v1_proto_api.js index 13ca89fe0..cf1dd4c84 100644 --- a/dev/protos/firestore_admin_v1_proto_api.js +++ b/dev/protos/firestore_admin_v1_proto_api.js @@ -1099,6 +1099,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#createDatabase}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef CreateDatabaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDatabase. + * @function createDatabase + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.ICreateDatabaseRequest} request CreateDatabaseRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.CreateDatabaseCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.createDatabase = function createDatabase(request, callback) { + return this.rpcCall(createDatabase, $root.google.firestore.admin.v1.CreateDatabaseRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDatabase" }); + + /** + * Calls CreateDatabase. + * @function createDatabase + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.ICreateDatabaseRequest} request CreateDatabaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getDatabase}. * @memberof google.firestore.admin.v1.FirestoreAdmin @@ -1299,6 +1332,215 @@ return ListDatabasesRequest; })(); + v1.CreateDatabaseRequest = (function() { + + /** + * Properties of a CreateDatabaseRequest. + * @memberof google.firestore.admin.v1 + * @interface ICreateDatabaseRequest + * @property {string|null} [parent] CreateDatabaseRequest parent + * @property {google.firestore.admin.v1.IDatabase|null} [database] CreateDatabaseRequest database + * @property {string|null} [databaseId] CreateDatabaseRequest databaseId + */ + + /** + * Constructs a new CreateDatabaseRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a CreateDatabaseRequest. + * @implements ICreateDatabaseRequest + * @constructor + * @param {google.firestore.admin.v1.ICreateDatabaseRequest=} [properties] Properties to set + */ + function CreateDatabaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDatabaseRequest parent. + * @member {string} parent + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + */ + CreateDatabaseRequest.prototype.parent = ""; + + /** + * CreateDatabaseRequest database. + * @member {google.firestore.admin.v1.IDatabase|null|undefined} database + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + */ + CreateDatabaseRequest.prototype.database = null; + + /** + * CreateDatabaseRequest databaseId. + * @member {string} databaseId + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + */ + CreateDatabaseRequest.prototype.databaseId = ""; + + /** + * Creates a CreateDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.CreateDatabaseRequest} CreateDatabaseRequest + */ + CreateDatabaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.CreateDatabaseRequest) + return object; + var message = new $root.google.firestore.admin.v1.CreateDatabaseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.database != null) { + if (typeof object.database !== "object") + throw TypeError(".google.firestore.admin.v1.CreateDatabaseRequest.database: object expected"); + message.database = $root.google.firestore.admin.v1.Database.fromObject(object.database); + } + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + return message; + }; + + /** + * Creates a plain object from a CreateDatabaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @static + * @param {google.firestore.admin.v1.CreateDatabaseRequest} message CreateDatabaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDatabaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.database = null; + object.databaseId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.database != null && message.hasOwnProperty("database")) + object.database = $root.google.firestore.admin.v1.Database.toObject(message.database, options); + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + return object; + }; + + /** + * Converts this CreateDatabaseRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDatabaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDatabaseRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDatabaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.CreateDatabaseRequest"; + }; + + return CreateDatabaseRequest; + })(); + + v1.CreateDatabaseMetadata = (function() { + + /** + * Properties of a CreateDatabaseMetadata. + * @memberof google.firestore.admin.v1 + * @interface ICreateDatabaseMetadata + */ + + /** + * Constructs a new CreateDatabaseMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a CreateDatabaseMetadata. + * @implements ICreateDatabaseMetadata + * @constructor + * @param {google.firestore.admin.v1.ICreateDatabaseMetadata=} [properties] Properties to set + */ + function CreateDatabaseMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a CreateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.CreateDatabaseMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.CreateDatabaseMetadata} CreateDatabaseMetadata + */ + CreateDatabaseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.CreateDatabaseMetadata) + return object; + return new $root.google.firestore.admin.v1.CreateDatabaseMetadata(); + }; + + /** + * Creates a plain object from a CreateDatabaseMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.CreateDatabaseMetadata + * @static + * @param {google.firestore.admin.v1.CreateDatabaseMetadata} message CreateDatabaseMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDatabaseMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreateDatabaseMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.CreateDatabaseMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateDatabaseMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDatabaseMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.CreateDatabaseMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDatabaseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.CreateDatabaseMetadata"; + }; + + return CreateDatabaseMetadata; + })(); + v1.ListDatabasesResponse = (function() { /** @@ -3048,6 +3290,7 @@ * @interface IIndex * @property {string|null} [name] Index name * @property {google.firestore.admin.v1.Index.QueryScope|null} [queryScope] Index queryScope + * @property {google.firestore.admin.v1.Index.ApiScope|null} [apiScope] Index apiScope * @property {Array.|null} [fields] Index fields * @property {google.firestore.admin.v1.Index.State|null} [state] Index state */ @@ -3084,6 +3327,14 @@ */ Index.prototype.queryScope = 0; + /** + * Index apiScope. + * @member {google.firestore.admin.v1.Index.ApiScope} apiScope + * @memberof google.firestore.admin.v1.Index + * @instance + */ + Index.prototype.apiScope = 0; + /** * Index fields. * @member {Array.} fields @@ -3133,6 +3384,26 @@ case 2: message.queryScope = 2; break; + case "COLLECTION_RECURSIVE": + case 3: + message.queryScope = 3; + break; + } + switch (object.apiScope) { + default: + if (typeof object.apiScope === "number") { + message.apiScope = object.apiScope; + break; + } + break; + case "ANY_API": + case 0: + message.apiScope = 0; + break; + case "DATASTORE_MODE_API": + case 1: + message.apiScope = 1; + break; } if (object.fields) { if (!Array.isArray(object.fields)) @@ -3190,6 +3461,7 @@ object.name = ""; object.queryScope = options.enums === String ? "QUERY_SCOPE_UNSPECIFIED" : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.apiScope = options.enums === String ? "ANY_API" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -3202,6 +3474,8 @@ } if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.firestore.admin.v1.Index.State[message.state] === undefined ? message.state : $root.google.firestore.admin.v1.Index.State[message.state] : message.state; + if (message.apiScope != null && message.hasOwnProperty("apiScope")) + object.apiScope = options.enums === String ? $root.google.firestore.admin.v1.Index.ApiScope[message.apiScope] === undefined ? message.apiScope : $root.google.firestore.admin.v1.Index.ApiScope[message.apiScope] : message.apiScope; return object; }; @@ -3238,12 +3512,28 @@ * @property {string} QUERY_SCOPE_UNSPECIFIED=QUERY_SCOPE_UNSPECIFIED QUERY_SCOPE_UNSPECIFIED value * @property {string} COLLECTION=COLLECTION COLLECTION value * @property {string} COLLECTION_GROUP=COLLECTION_GROUP COLLECTION_GROUP value + * @property {string} COLLECTION_RECURSIVE=COLLECTION_RECURSIVE COLLECTION_RECURSIVE value */ Index.QueryScope = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "QUERY_SCOPE_UNSPECIFIED"] = "QUERY_SCOPE_UNSPECIFIED"; values[valuesById[1] = "COLLECTION"] = "COLLECTION"; values[valuesById[2] = "COLLECTION_GROUP"] = "COLLECTION_GROUP"; + values[valuesById[3] = "COLLECTION_RECURSIVE"] = "COLLECTION_RECURSIVE"; + return values; + })(); + + /** + * ApiScope enum. + * @name google.firestore.admin.v1.Index.ApiScope + * @enum {string} + * @property {string} ANY_API=ANY_API ANY_API value + * @property {string} DATASTORE_MODE_API=DATASTORE_MODE_API DATASTORE_MODE_API value + */ + Index.ApiScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANY_API"] = "ANY_API"; + values[valuesById[1] = "DATASTORE_MODE_API"] = "DATASTORE_MODE_API"; return values; })(); @@ -6018,6 +6308,7 @@ * @property {string|null} [docTagPrefix] Publishing docTagPrefix * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri */ /** @@ -6110,6 +6401,14 @@ */ Publishing.prototype.librarySettings = $util.emptyArray; + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + /** * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6176,6 +6475,18 @@ case 4: message.organization = 4; break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; } if (object.librarySettings) { if (!Array.isArray(object.librarySettings)) @@ -6187,6 +6498,8 @@ message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); } } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); return message; }; @@ -6215,6 +6528,7 @@ object.githubLabel = ""; object.docTagPrefix = ""; object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; } if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; @@ -6243,6 +6557,8 @@ for (var j = 0; j < message.librarySettings.length; ++j) object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; @@ -6827,6 +7143,11 @@ * @memberof google.api * @interface IDotnetSettings * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures */ /** @@ -6838,6 +7159,11 @@ * @param {google.api.IDotnetSettings=} [properties] Properties to set */ function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6852,6 +7178,46 @@ */ DotnetSettings.prototype.common = null; + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + /** * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6869,6 +7235,41 @@ throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } return message; }; @@ -6885,10 +7286,45 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } if (options.defaults) object.common = null; if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } return object; }; @@ -7398,6 +7834,9 @@ * @property {string} ADS=ADS ADS value * @property {string} PHOTOS=PHOTOS PHOTOS value * @property {string} STREET_VIEW=STREET_VIEW STREET_VIEW value + * @property {string} SHOPPING=SHOPPING SHOPPING value + * @property {string} GEO=GEO GEO value + * @property {string} GENERATIVE_AI=GENERATIVE_AI GENERATIVE_AI value */ api.ClientLibraryOrganization = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -7406,6 +7845,9 @@ values[valuesById[2] = "ADS"] = "ADS"; values[valuesById[3] = "PHOTOS"] = "PHOTOS"; values[valuesById[4] = "STREET_VIEW"] = "STREET_VIEW"; + values[valuesById[5] = "SHOPPING"] = "SHOPPING"; + values[valuesById[6] = "GEO"] = "GEO"; + values[valuesById[7] = "GENERATIVE_AI"] = "GENERATIVE_AI"; return values; })(); diff --git a/dev/protos/firestore_v1_proto_api.d.ts b/dev/protos/firestore_v1_proto_api.d.ts index ec8d2ce9d..293e4fa51 100644 --- a/dev/protos/firestore_v1_proto_api.d.ts +++ b/dev/protos/firestore_v1_proto_api.d.ts @@ -3067,6 +3067,114 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BitSequence. */ + interface IBitSequence { + + /** BitSequence bitmap */ + bitmap?: (Uint8Array|null); + + /** BitSequence padding */ + padding?: (number|null); + } + + /** Represents a BitSequence. */ + class BitSequence implements IBitSequence { + + /** + * Constructs a new BitSequence. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IBitSequence); + + /** BitSequence bitmap. */ + public bitmap: Uint8Array; + + /** BitSequence padding. */ + public padding: number; + + /** + * Creates a BitSequence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BitSequence + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.BitSequence; + + /** + * Creates a plain object from a BitSequence message. Also converts values to other types if specified. + * @param message BitSequence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.BitSequence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BitSequence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BitSequence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BloomFilter. */ + interface IBloomFilter { + + /** BloomFilter bits */ + bits?: (google.firestore.v1.IBitSequence|null); + + /** BloomFilter hashCount */ + hashCount?: (number|null); + } + + /** Represents a BloomFilter. */ + class BloomFilter implements IBloomFilter { + + /** + * Constructs a new BloomFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IBloomFilter); + + /** BloomFilter bits. */ + public bits?: (google.firestore.v1.IBitSequence|null); + + /** BloomFilter hashCount. */ + public hashCount: number; + + /** + * Creates a BloomFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BloomFilter + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.BloomFilter; + + /** + * Creates a plain object from a BloomFilter message. Also converts values to other types if specified. + * @param message BloomFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.BloomFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BloomFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BloomFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a DocumentMask. */ interface IDocumentMask { @@ -5520,6 +5628,9 @@ export namespace google { /** Target once */ once?: (boolean|null); + + /** Target expectedCount */ + expectedCount?: (google.protobuf.IInt32Value|null); } /** Represents a Target. */ @@ -5549,6 +5660,9 @@ export namespace google { /** Target once. */ public once: boolean; + /** Target expectedCount. */ + public expectedCount?: (google.protobuf.IInt32Value|null); + /** Target targetType. */ public targetType?: ("query"|"documents"); @@ -6629,6 +6743,12 @@ export namespace google { /** Aggregation count */ count?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null); + /** Aggregation sum */ + sum?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.ISum|null); + + /** Aggregation avg */ + avg?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.IAvg|null); + /** Aggregation alias */ alias?: (string|null); } @@ -6645,11 +6765,17 @@ export namespace google { /** Aggregation count. */ public count?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null); + /** Aggregation sum. */ + public sum?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.ISum|null); + + /** Aggregation avg. */ + public avg?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.IAvg|null); + /** Aggregation alias. */ public alias: string; /** Aggregation operator. */ - public operator?: "count"; + public operator?: ("count"|"sum"|"avg"); /** * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. @@ -6729,6 +6855,102 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a Sum. */ + interface ISum { + + /** Sum field */ + field?: (google.firestore.v1.StructuredQuery.IFieldReference|null); + } + + /** Represents a Sum. */ + class Sum implements ISum { + + /** + * Constructs a new Sum. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.StructuredAggregationQuery.Aggregation.ISum); + + /** Sum field. */ + public field?: (google.firestore.v1.StructuredQuery.IFieldReference|null); + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sum + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @param message Sum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Avg. */ + interface IAvg { + + /** Avg field */ + field?: (google.firestore.v1.StructuredQuery.IFieldReference|null); + } + + /** Represents an Avg. */ + class Avg implements IAvg { + + /** + * Constructs a new Avg. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.StructuredAggregationQuery.Aggregation.IAvg); + + /** Avg field. */ + public field?: (google.firestore.v1.StructuredQuery.IFieldReference|null); + + /** + * Creates an Avg message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Avg + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg; + + /** + * Creates a plain object from an Avg message. Also converts values to other types if specified. + * @param message Avg + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Avg to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Avg + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } @@ -7260,6 +7482,9 @@ export namespace google { /** ExistenceFilter count */ count?: (number|null); + + /** ExistenceFilter unchangedNames */ + unchangedNames?: (google.firestore.v1.IBloomFilter|null); } /** Represents an ExistenceFilter. */ @@ -7277,6 +7502,9 @@ export namespace google { /** ExistenceFilter count. */ public count: number; + /** ExistenceFilter unchangedNames. */ + public unchangedNames?: (google.firestore.v1.IBloomFilter|null); + /** * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -7703,6 +7931,9 @@ export namespace google { /** Publishing librarySettings */ librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); } /** Represents a Publishing. */ @@ -7741,6 +7972,9 @@ export namespace google { /** Publishing librarySettings. */ public librarySettings: google.api.IClientLibrarySettings[]; + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + /** * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -8027,6 +8261,21 @@ export namespace google { /** DotnetSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); } /** Represents a DotnetSettings. */ @@ -8041,6 +8290,21 @@ export namespace google { /** DotnetSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + /** * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -8291,7 +8555,7 @@ export namespace google { /** ClientLibraryOrganization enum. */ type ClientLibraryOrganization = - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"| "CLOUD"| "ADS"| "PHOTOS"| "STREET_VIEW"; + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"| "CLOUD"| "ADS"| "PHOTOS"| "STREET_VIEW"| "SHOPPING"| "GEO"| "GENERATIVE_AI"; /** ClientLibraryDestination enum. */ type ClientLibraryDestination = diff --git a/dev/protos/firestore_v1_proto_api.js b/dev/protos/firestore_v1_proto_api.js index 916190dd4..0fe6356c0 100644 --- a/dev/protos/firestore_v1_proto_api.js +++ b/dev/protos/firestore_v1_proto_api.js @@ -7519,6 +7519,244 @@ return AggregationResult; })(); + v1.BitSequence = (function() { + + /** + * Properties of a BitSequence. + * @memberof google.firestore.v1 + * @interface IBitSequence + * @property {Uint8Array|null} [bitmap] BitSequence bitmap + * @property {number|null} [padding] BitSequence padding + */ + + /** + * Constructs a new BitSequence. + * @memberof google.firestore.v1 + * @classdesc Represents a BitSequence. + * @implements IBitSequence + * @constructor + * @param {google.firestore.v1.IBitSequence=} [properties] Properties to set + */ + function BitSequence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BitSequence bitmap. + * @member {Uint8Array} bitmap + * @memberof google.firestore.v1.BitSequence + * @instance + */ + BitSequence.prototype.bitmap = $util.newBuffer([]); + + /** + * BitSequence padding. + * @member {number} padding + * @memberof google.firestore.v1.BitSequence + * @instance + */ + BitSequence.prototype.padding = 0; + + /** + * Creates a BitSequence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.BitSequence + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.BitSequence} BitSequence + */ + BitSequence.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.BitSequence) + return object; + var message = new $root.google.firestore.v1.BitSequence(); + if (object.bitmap != null) + if (typeof object.bitmap === "string") + $util.base64.decode(object.bitmap, message.bitmap = $util.newBuffer($util.base64.length(object.bitmap)), 0); + else if (object.bitmap.length >= 0) + message.bitmap = object.bitmap; + if (object.padding != null) + message.padding = object.padding | 0; + return message; + }; + + /** + * Creates a plain object from a BitSequence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.BitSequence + * @static + * @param {google.firestore.v1.BitSequence} message BitSequence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BitSequence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.bitmap = ""; + else { + object.bitmap = []; + if (options.bytes !== Array) + object.bitmap = $util.newBuffer(object.bitmap); + } + object.padding = 0; + } + if (message.bitmap != null && message.hasOwnProperty("bitmap")) + object.bitmap = options.bytes === String ? $util.base64.encode(message.bitmap, 0, message.bitmap.length) : options.bytes === Array ? Array.prototype.slice.call(message.bitmap) : message.bitmap; + if (message.padding != null && message.hasOwnProperty("padding")) + object.padding = message.padding; + return object; + }; + + /** + * Converts this BitSequence to JSON. + * @function toJSON + * @memberof google.firestore.v1.BitSequence + * @instance + * @returns {Object.} JSON object + */ + BitSequence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BitSequence + * @function getTypeUrl + * @memberof google.firestore.v1.BitSequence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BitSequence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BitSequence"; + }; + + return BitSequence; + })(); + + v1.BloomFilter = (function() { + + /** + * Properties of a BloomFilter. + * @memberof google.firestore.v1 + * @interface IBloomFilter + * @property {google.firestore.v1.IBitSequence|null} [bits] BloomFilter bits + * @property {number|null} [hashCount] BloomFilter hashCount + */ + + /** + * Constructs a new BloomFilter. + * @memberof google.firestore.v1 + * @classdesc Represents a BloomFilter. + * @implements IBloomFilter + * @constructor + * @param {google.firestore.v1.IBloomFilter=} [properties] Properties to set + */ + function BloomFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BloomFilter bits. + * @member {google.firestore.v1.IBitSequence|null|undefined} bits + * @memberof google.firestore.v1.BloomFilter + * @instance + */ + BloomFilter.prototype.bits = null; + + /** + * BloomFilter hashCount. + * @member {number} hashCount + * @memberof google.firestore.v1.BloomFilter + * @instance + */ + BloomFilter.prototype.hashCount = 0; + + /** + * Creates a BloomFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.BloomFilter + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.BloomFilter} BloomFilter + */ + BloomFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.BloomFilter) + return object; + var message = new $root.google.firestore.v1.BloomFilter(); + if (object.bits != null) { + if (typeof object.bits !== "object") + throw TypeError(".google.firestore.v1.BloomFilter.bits: object expected"); + message.bits = $root.google.firestore.v1.BitSequence.fromObject(object.bits); + } + if (object.hashCount != null) + message.hashCount = object.hashCount | 0; + return message; + }; + + /** + * Creates a plain object from a BloomFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.BloomFilter + * @static + * @param {google.firestore.v1.BloomFilter} message BloomFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BloomFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bits = null; + object.hashCount = 0; + } + if (message.bits != null && message.hasOwnProperty("bits")) + object.bits = $root.google.firestore.v1.BitSequence.toObject(message.bits, options); + if (message.hashCount != null && message.hasOwnProperty("hashCount")) + object.hashCount = message.hashCount; + return object; + }; + + /** + * Converts this BloomFilter to JSON. + * @function toJSON + * @memberof google.firestore.v1.BloomFilter + * @instance + * @returns {Object.} JSON object + */ + BloomFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BloomFilter + * @function getTypeUrl + * @memberof google.firestore.v1.BloomFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BloomFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BloomFilter"; + }; + + return BloomFilter; + })(); + v1.DocumentMask = (function() { /** @@ -13122,6 +13360,7 @@ * @property {google.protobuf.ITimestamp|null} [readTime] Target readTime * @property {number|null} [targetId] Target targetId * @property {boolean|null} [once] Target once + * @property {google.protobuf.IInt32Value|null} [expectedCount] Target expectedCount */ /** @@ -13187,6 +13426,14 @@ */ Target.prototype.once = false; + /** + * Target expectedCount. + * @member {google.protobuf.IInt32Value|null|undefined} expectedCount + * @memberof google.firestore.v1.Target + * @instance + */ + Target.prototype.expectedCount = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -13248,6 +13495,11 @@ message.targetId = object.targetId | 0; if (object.once != null) message.once = Boolean(object.once); + if (object.expectedCount != null) { + if (typeof object.expectedCount !== "object") + throw TypeError(".google.firestore.v1.Target.expectedCount: object expected"); + message.expectedCount = $root.google.protobuf.Int32Value.fromObject(object.expectedCount); + } return message; }; @@ -13267,6 +13519,7 @@ if (options.defaults) { object.targetId = 0; object.once = false; + object.expectedCount = null; } if (message.query != null && message.hasOwnProperty("query")) { object.query = $root.google.firestore.v1.Target.QueryTarget.toObject(message.query, options); @@ -13292,6 +13545,8 @@ if (options.oneofs) object.resumeType = "readTime"; } + if (message.expectedCount != null && message.hasOwnProperty("expectedCount")) + object.expectedCount = $root.google.protobuf.Int32Value.toObject(message.expectedCount, options); return object; }; @@ -15918,6 +16173,8 @@ * @memberof google.firestore.v1.StructuredAggregationQuery * @interface IAggregation * @property {google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null} [count] Aggregation count + * @property {google.firestore.v1.StructuredAggregationQuery.Aggregation.ISum|null} [sum] Aggregation sum + * @property {google.firestore.v1.StructuredAggregationQuery.Aggregation.IAvg|null} [avg] Aggregation avg * @property {string|null} [alias] Aggregation alias */ @@ -15944,6 +16201,22 @@ */ Aggregation.prototype.count = null; + /** + * Aggregation sum. + * @member {google.firestore.v1.StructuredAggregationQuery.Aggregation.ISum|null|undefined} sum + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @instance + */ + Aggregation.prototype.sum = null; + + /** + * Aggregation avg. + * @member {google.firestore.v1.StructuredAggregationQuery.Aggregation.IAvg|null|undefined} avg + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @instance + */ + Aggregation.prototype.avg = null; + /** * Aggregation alias. * @member {string} alias @@ -15957,12 +16230,12 @@ /** * Aggregation operator. - * @member {"count"|undefined} operator + * @member {"count"|"sum"|"avg"|undefined} operator * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation * @instance */ Object.defineProperty(Aggregation.prototype, "operator", { - get: $util.oneOfGetter($oneOfFields = ["count"]), + get: $util.oneOfGetter($oneOfFields = ["count", "sum", "avg"]), set: $util.oneOfSetter($oneOfFields) }); @@ -15983,6 +16256,16 @@ throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.count: object expected"); message.count = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.fromObject(object.count); } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.sum: object expected"); + message.sum = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.fromObject(object.sum); + } + if (object.avg != null) { + if (typeof object.avg !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.avg: object expected"); + message.avg = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.fromObject(object.avg); + } if (object.alias != null) message.alias = String(object.alias); return message; @@ -16008,6 +16291,16 @@ if (options.oneofs) object.operator = "count"; } + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.toObject(message.sum, options); + if (options.oneofs) + object.operator = "sum"; + } + if (message.avg != null && message.hasOwnProperty("avg")) { + object.avg = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.toObject(message.avg, options); + if (options.oneofs) + object.operator = "avg"; + } if (message.alias != null && message.hasOwnProperty("alias")) object.alias = message.alias; return object; @@ -16140,6 +16433,208 @@ return Count; })(); + Aggregation.Sum = (function() { + + /** + * Properties of a Sum. + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @interface ISum + * @property {google.firestore.v1.StructuredQuery.IFieldReference|null} [field] Sum field + */ + + /** + * Constructs a new Sum. + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation.ISum=} [properties] Properties to set + */ + function Sum(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Sum field. + * @member {google.firestore.v1.StructuredQuery.IFieldReference|null|undefined} field + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + * @instance + */ + Sum.prototype.field = null; + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum} Sum + */ + Sum.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum) + return object; + var message = new $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field: object expected"); + message.field = $root.google.firestore.v1.StructuredQuery.FieldReference.fromObject(object.field); + } + return message; + }; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + * @static + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.field, options); + return object; + }; + + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum"; + }; + + return Sum; + })(); + + Aggregation.Avg = (function() { + + /** + * Properties of an Avg. + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @interface IAvg + * @property {google.firestore.v1.StructuredQuery.IFieldReference|null} [field] Avg field + */ + + /** + * Constructs a new Avg. + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @classdesc Represents an Avg. + * @implements IAvg + * @constructor + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation.IAvg=} [properties] Properties to set + */ + function Avg(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Avg field. + * @member {google.firestore.v1.StructuredQuery.IFieldReference|null|undefined} field + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + * @instance + */ + Avg.prototype.field = null; + + /** + * Creates an Avg message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg} Avg + */ + Avg.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg) + return object; + var message = new $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field: object expected"); + message.field = $root.google.firestore.v1.StructuredQuery.FieldReference.fromObject(object.field); + } + return message; + }; + + /** + * Creates a plain object from an Avg message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + * @static + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg} message Avg + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Avg.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.field, options); + return object; + }; + + /** + * Converts this Avg to JSON. + * @function toJSON + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + * @instance + * @returns {Object.} JSON object + */ + Avg.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Avg + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Avg.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg"; + }; + + return Avg; + })(); + return Aggregation; })(); @@ -17426,6 +17921,7 @@ * @interface IExistenceFilter * @property {number|null} [targetId] ExistenceFilter targetId * @property {number|null} [count] ExistenceFilter count + * @property {google.firestore.v1.IBloomFilter|null} [unchangedNames] ExistenceFilter unchangedNames */ /** @@ -17459,6 +17955,14 @@ */ ExistenceFilter.prototype.count = 0; + /** + * ExistenceFilter unchangedNames. + * @member {google.firestore.v1.IBloomFilter|null|undefined} unchangedNames + * @memberof google.firestore.v1.ExistenceFilter + * @instance + */ + ExistenceFilter.prototype.unchangedNames = null; + /** * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -17475,6 +17979,11 @@ message.targetId = object.targetId | 0; if (object.count != null) message.count = object.count | 0; + if (object.unchangedNames != null) { + if (typeof object.unchangedNames !== "object") + throw TypeError(".google.firestore.v1.ExistenceFilter.unchangedNames: object expected"); + message.unchangedNames = $root.google.firestore.v1.BloomFilter.fromObject(object.unchangedNames); + } return message; }; @@ -17494,11 +18003,14 @@ if (options.defaults) { object.targetId = 0; object.count = 0; + object.unchangedNames = null; } if (message.targetId != null && message.hasOwnProperty("targetId")) object.targetId = message.targetId; if (message.count != null && message.hasOwnProperty("count")) object.count = message.count; + if (message.unchangedNames != null && message.hasOwnProperty("unchangedNames")) + object.unchangedNames = $root.google.firestore.v1.BloomFilter.toObject(message.unchangedNames, options); return object; }; @@ -18478,6 +18990,7 @@ * @property {string|null} [docTagPrefix] Publishing docTagPrefix * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri */ /** @@ -18570,6 +19083,14 @@ */ Publishing.prototype.librarySettings = $util.emptyArray; + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + /** * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -18636,6 +19157,18 @@ case 4: message.organization = 4; break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; } if (object.librarySettings) { if (!Array.isArray(object.librarySettings)) @@ -18647,6 +19180,8 @@ message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); } } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); return message; }; @@ -18675,6 +19210,7 @@ object.githubLabel = ""; object.docTagPrefix = ""; object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; } if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; @@ -18703,6 +19239,8 @@ for (var j = 0; j < message.librarySettings.length; ++j) object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; @@ -19287,6 +19825,11 @@ * @memberof google.api * @interface IDotnetSettings * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures */ /** @@ -19298,6 +19841,11 @@ * @param {google.api.IDotnetSettings=} [properties] Properties to set */ function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19312,6 +19860,46 @@ */ DotnetSettings.prototype.common = null; + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + /** * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -19329,6 +19917,41 @@ throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } return message; }; @@ -19345,10 +19968,45 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } if (options.defaults) object.common = null; if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } return object; }; @@ -19858,6 +20516,9 @@ * @property {string} ADS=ADS ADS value * @property {string} PHOTOS=PHOTOS PHOTOS value * @property {string} STREET_VIEW=STREET_VIEW STREET_VIEW value + * @property {string} SHOPPING=SHOPPING SHOPPING value + * @property {string} GEO=GEO GEO value + * @property {string} GENERATIVE_AI=GENERATIVE_AI GENERATIVE_AI value */ api.ClientLibraryOrganization = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -19866,6 +20527,9 @@ values[valuesById[2] = "ADS"] = "ADS"; values[valuesById[3] = "PHOTOS"] = "PHOTOS"; values[valuesById[4] = "STREET_VIEW"] = "STREET_VIEW"; + values[valuesById[5] = "SHOPPING"] = "SHOPPING"; + values[valuesById[6] = "GEO"] = "GEO"; + values[valuesById[7] = "GENERATIVE_AI"] = "GENERATIVE_AI"; return values; })(); diff --git a/dev/protos/firestore_v1beta1_proto_api.d.ts b/dev/protos/firestore_v1beta1_proto_api.d.ts index 722b8bd4c..6bb394bc5 100644 --- a/dev/protos/firestore_v1beta1_proto_api.d.ts +++ b/dev/protos/firestore_v1beta1_proto_api.d.ts @@ -5700,7 +5700,7 @@ export namespace google { /** Operator enum. */ type Operator = - "OPERATOR_UNSPECIFIED"| "AND"| "OR"; + "OPERATOR_UNSPECIFIED"| "AND"; } /** Properties of a FieldFilter. */ @@ -6960,6 +6960,9 @@ export namespace google { /** Publishing librarySettings */ librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); } /** Represents a Publishing. */ @@ -6998,6 +7001,9 @@ export namespace google { /** Publishing librarySettings. */ public librarySettings: google.api.IClientLibrarySettings[]; + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + /** * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -7284,6 +7290,21 @@ export namespace google { /** DotnetSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); } /** Represents a DotnetSettings. */ @@ -7298,6 +7319,21 @@ export namespace google { /** DotnetSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + /** * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -7548,7 +7584,7 @@ export namespace google { /** ClientLibraryOrganization enum. */ type ClientLibraryOrganization = - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"| "CLOUD"| "ADS"| "PHOTOS"| "STREET_VIEW"; + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"| "CLOUD"| "ADS"| "PHOTOS"| "STREET_VIEW"| "SHOPPING"| "GEO"| "GENERATIVE_AI"; /** ClientLibraryDestination enum. */ type ClientLibraryDestination = diff --git a/dev/protos/firestore_v1beta1_proto_api.js b/dev/protos/firestore_v1beta1_proto_api.js index 6d92507f8..bd47626ef 100644 --- a/dev/protos/firestore_v1beta1_proto_api.js +++ b/dev/protos/firestore_v1beta1_proto_api.js @@ -16701,6 +16701,7 @@ * @property {string|null} [docTagPrefix] Publishing docTagPrefix * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri */ /** @@ -16793,6 +16794,14 @@ */ Publishing.prototype.librarySettings = $util.emptyArray; + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + /** * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16859,6 +16868,18 @@ case 4: message.organization = 4; break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; } if (object.librarySettings) { if (!Array.isArray(object.librarySettings)) @@ -16870,6 +16891,8 @@ message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); } } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); return message; }; @@ -16898,6 +16921,7 @@ object.githubLabel = ""; object.docTagPrefix = ""; object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; } if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; @@ -16926,6 +16950,8 @@ for (var j = 0; j < message.librarySettings.length; ++j) object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; @@ -17510,6 +17536,11 @@ * @memberof google.api * @interface IDotnetSettings * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures */ /** @@ -17521,6 +17552,11 @@ * @param {google.api.IDotnetSettings=} [properties] Properties to set */ function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17535,6 +17571,46 @@ */ DotnetSettings.prototype.common = null; + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + /** * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -17552,6 +17628,41 @@ throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } return message; }; @@ -17568,10 +17679,45 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } if (options.defaults) object.common = null; if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } return object; }; @@ -18081,6 +18227,9 @@ * @property {string} ADS=ADS ADS value * @property {string} PHOTOS=PHOTOS PHOTOS value * @property {string} STREET_VIEW=STREET_VIEW STREET_VIEW value + * @property {string} SHOPPING=SHOPPING SHOPPING value + * @property {string} GEO=GEO GEO value + * @property {string} GENERATIVE_AI=GENERATIVE_AI GENERATIVE_AI value */ api.ClientLibraryOrganization = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -18089,6 +18238,9 @@ values[valuesById[2] = "ADS"] = "ADS"; values[valuesById[3] = "PHOTOS"] = "PHOTOS"; values[valuesById[4] = "STREET_VIEW"] = "STREET_VIEW"; + values[valuesById[5] = "SHOPPING"] = "SHOPPING"; + values[valuesById[6] = "GEO"] = "GEO"; + values[valuesById[7] = "GENERATIVE_AI"] = "GENERATIVE_AI"; return values; })(); diff --git a/dev/protos/google/firestore/admin/v1/firestore_admin.proto b/dev/protos/google/firestore/admin/v1/firestore_admin.proto index 71f849d0b..e1faa4dcf 100644 --- a/dev/protos/google/firestore/admin/v1/firestore_admin.proto +++ b/dev/protos/google/firestore/admin/v1/firestore_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -78,9 +78,11 @@ service FirestoreAdmin { "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/datastore"; - // Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] - // which may be used to track the status of the creation. The metadata for - // the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + // 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" @@ -127,13 +129,16 @@ 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: @@ -152,10 +157,12 @@ 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" @@ -174,7 +181,8 @@ service FirestoreAdmin { // // For more details on export behavior and output format, refer to: // https://cloud.google.com/firestore/docs/manage-data/export-import - 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: "*" @@ -191,7 +199,8 @@ 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: "*" @@ -203,6 +212,20 @@ service FirestoreAdmin { }; } + // Create a database. + rpc CreateDatabase(CreateDatabaseRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/databases" + body: "database" + }; + option (google.api.method_signature) = "parent,database,database_id"; + option (google.longrunning.operation_info) = { + response_type: "Database" + metadata_type: "CreateDatabaseMetadata" + }; + } + // Gets information about a database. rpc GetDatabase(GetDatabaseRequest) returns (Database) { option (google.api.http) = { @@ -220,7 +243,8 @@ service FirestoreAdmin { } // Updates a database. - rpc UpdateDatabase(UpdateDatabaseRequest) returns (google.longrunning.Operation) { + rpc UpdateDatabase(UpdateDatabaseRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{database.name=projects/*/databases/*}" body: "database" @@ -245,13 +269,39 @@ message ListDatabasesRequest { ]; } +// The request for +// [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase]. +message CreateDatabaseRequest { + // Required. A parent name of the form + // `projects/{project_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "firestore.googleapis.com/Database" + } + ]; + + // Required. The Database to create. + Database database = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the database, which will become the final + // component of the database's resource name. + // + // The value must be set to "(default)". + string database_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata related to the create database operation. +message CreateDatabaseMetadata {} + // The list of databases for a project. message ListDatabasesResponse { // The databases in the project. repeated Database databases = 1; } -// The request for [FirestoreAdmin.GetDatabase][google.firestore.admin.v1.FirestoreAdmin.GetDatabase]. +// The request for +// [FirestoreAdmin.GetDatabase][google.firestore.admin.v1.FirestoreAdmin.GetDatabase]. message GetDatabaseRequest { // Required. A name of the form // `projects/{project_id}/databases/{database_id}` @@ -263,7 +313,8 @@ message GetDatabaseRequest { ]; } -// The request for [FirestoreAdmin.UpdateDatabase][google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase]. +// The request for +// [FirestoreAdmin.UpdateDatabase][google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase]. message UpdateDatabaseRequest { // Required. The database to update. Database database = 1 [(google.api.field_behavior) = REQUIRED]; @@ -273,11 +324,10 @@ message UpdateDatabaseRequest { } // Metadata related to the update database operation. -message UpdateDatabaseMetadata { +message UpdateDatabaseMetadata {} -} - -// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +// The request for +// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. message CreateIndexRequest { // Required. A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -292,7 +342,8 @@ message CreateIndexRequest { Index index = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +// The request for +// [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. message ListIndexesRequest { // Required. A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -310,12 +361,13 @@ 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; @@ -325,31 +377,30 @@ 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 { // Required. A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "firestore.googleapis.com/Index" - } + (google.api.resource_reference) = { type: "firestore.googleapis.com/Index" } ]; } -// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. +// The request for +// [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. message DeleteIndexRequest { // Required. A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "firestore.googleapis.com/Index" - } + (google.api.resource_reference) = { type: "firestore.googleapis.com/Index" } ]; } -// The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. +// The request for +// [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. message UpdateFieldRequest { // Required. The field to be updated. Field field = 1 [(google.api.field_behavior) = REQUIRED]; @@ -359,19 +410,19 @@ 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 { // Required. A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "firestore.googleapis.com/Field" - } + (google.api.resource_reference) = { type: "firestore.googleapis.com/Field" } ]; } -// The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. +// The request for +// [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. message ListFieldsRequest { // Required. A parent name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` @@ -383,22 +434,24 @@ message ListFieldsRequest { ]; // 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 a filter that includes - // `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 a filter that includes `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; @@ -408,7 +461,8 @@ 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 { // Required. Database to export. Should be of the form: // `projects/{project_id}/databases/{database_id}`. @@ -433,7 +487,8 @@ 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 { // Required. Database to import into. Should be of the form: // `projects/{project_id}/databases/{database_id}`. diff --git a/dev/protos/google/firestore/v1/common.proto b/dev/protos/google/firestore/v1/common.proto index 29cde08d3..2a562aa6e 100644 --- a/dev/protos/google/firestore/v1/common.proto +++ b/dev/protos/google/firestore/v1/common.proto @@ -57,6 +57,9 @@ message Precondition { // Options for creating a new transaction. message TransactionOptions { // Options for a transaction that can be used to read and write documents. + // + // Firestore does not allow 3rd party auth requests to create read-write. + // transactions. message ReadWrite { // An optional transaction to retry. bytes retry_transaction = 1; @@ -68,7 +71,10 @@ message TransactionOptions { // consistency. oneof consistency_selector { // Reads documents at the given time. - // This may not be older than 60 seconds. + // + // This must be a microsecond precision timestamp within the past one + // hour, or if Point-in-Time Recovery is enabled, can additionally be a + // whole minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 2; } } diff --git a/dev/protos/google/firestore/v1/firestore.proto b/dev/protos/google/firestore/v1/firestore.proto index c6f7b921c..a4447d167 100644 --- a/dev/protos/google/firestore/v1/firestore.proto +++ b/dev/protos/google/firestore/v1/firestore.proto @@ -256,7 +256,10 @@ message GetDocumentRequest { bytes transaction = 3; // Reads the version of the document at the given time. - // This may not be older than 270 seconds. + // + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 5; } } @@ -316,7 +319,9 @@ message ListDocumentsRequest { // Perform the read at the provided time. // - // This may not be older than 270 seconds. + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 10; } @@ -442,7 +447,10 @@ message BatchGetDocumentsRequest { TransactionOptions new_transaction = 5; // Reads documents as they were at the given time. - // This may not be older than 270 seconds. + // + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 7; } } @@ -562,7 +570,10 @@ message RunQueryRequest { TransactionOptions new_transaction = 6; // Reads documents as they were at the given time. - // This may not be older than 270 seconds. + // + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 7; } } @@ -635,9 +646,9 @@ message RunAggregationQueryRequest { // Executes the query at the given timestamp. // - // Requires: - // - // * Cannot be more than 270 seconds in the past. + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 6; } } @@ -723,7 +734,10 @@ message PartitionQueryRequest { // If not set, defaults to strong consistency. oneof consistency_selector { // Reads documents as they were at the given time. - // This may not be older than 270 seconds. + // + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 6; } } @@ -912,8 +926,9 @@ message Target { // When to start listening. // - // If not specified, all matching Documents are returned before any - // subsequent changes. + // If specified, only the matching Documents that have been updated AFTER the + // `resume_token` or `read_time` will be returned. Otherwise, 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. @@ -1026,7 +1041,10 @@ message ListCollectionIdsRequest { // If not set, defaults to strong consistency. oneof consistency_selector { // Reads documents as they were at the given time. - // This may not be older than 270 seconds. + // + // This must be a microsecond precision timestamp within the past one hour, + // or if Point-in-Time Recovery is enabled, can additionally be a whole + // minute timestamp within the past 7 days. google.protobuf.Timestamp read_time = 4; } } diff --git a/dev/protos/google/firestore/v1/query.proto b/dev/protos/google/firestore/v1/query.proto index 8f89c48d9..4a4919634 100644 --- a/dev/protos/google/firestore/v1/query.proto +++ b/dev/protos/google/firestore/v1/query.proto @@ -384,10 +384,58 @@ message StructuredAggregationQuery { [(google.api.field_behavior) = OPTIONAL]; } + // Sum of the values of the requested field. + // + // * Only numeric values will be aggregated. All non-numeric values + // including `NULL` are skipped. + // + // * If the aggregated values contain `NaN`, returns `NaN`. Infinity math + // follows IEEE-754 standards. + // + // * If the aggregated value set is empty, returns 0. + // + // * Returns a 64-bit integer if all aggregated numbers are integers and the + // sum result does not overflow. Otherwise, the result is returned as a + // double. Note that even if all the aggregated values are integers, the + // result is returned as a double if it cannot fit within a 64-bit signed + // integer. When this occurs, the returned value will lose precision. + // + // * When underflow occurs, floating-point aggregation is non-deterministic. + // This means that running the same query repeatedly without any changes to + // the underlying values could produce slightly different results each + // time. In those cases, values should be stored as integers over + // floating-point numbers. + message Sum { + // The field to aggregate on. + StructuredQuery.FieldReference field = 1; + } + + // Average of the values of the requested field. + // + // * Only numeric values will be aggregated. All non-numeric values + // including `NULL` are skipped. + // + // * If the aggregated values contain `NaN`, returns `NaN`. Infinity math + // follows IEEE-754 standards. + // + // * If the aggregated value set is empty, returns `NULL`. + // + // * Always returns the result as a double. + message Avg { + // The field to aggregate on. + StructuredQuery.FieldReference field = 1; + } + // The type of aggregation to perform, required. oneof operator { // Count aggregator. Count count = 1; + + // Sum aggregator. + Sum sum = 2; + + // Average aggregator. + Avg avg = 3; } // Optional. Optional name of the field to store the result of the diff --git a/dev/protos/google/firestore/v1/write.proto b/dev/protos/google/firestore/v1/write.proto index 4ed0f5475..4b46595ce 100644 --- a/dev/protos/google/firestore/v1/write.proto +++ b/dev/protos/google/firestore/v1/write.proto @@ -264,14 +264,17 @@ message ExistenceFilter { // // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. + // + // The client can use the `unchanged_names` bloom filter to assist with + // this determination by testing ALL the document names against the filter; + // if the document name is NOT in the filter, it means the document no + // longer matches the target. int32 count = 2; - // A bloom filter that contains the UTF-8 byte encodings of the resource names - // of the documents that match + // A bloom filter that, despite its name, contains the UTF-8 byte encodings of + // the resource names of ALL the documents that match // [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - // `projects/{project_id}/databases/{database_id}/documents/{document_path}` - // that have NOT changed since the query results indicated by the resume token - // or timestamp given in `Target.resume_type`. + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. // // This bloom filter may be omitted at the server's discretion, such as if it // is deemed that the client will not make use of it or if it is too diff --git a/dev/protos/google/protobuf/descriptor.proto b/dev/protos/google/protobuf/descriptor.proto index c994d4a7b..5f148224c 100644 --- a/dev/protos/google/protobuf/descriptor.proto +++ b/dev/protos/google/protobuf/descriptor.proto @@ -146,9 +146,6 @@ message ExtensionRangeOptions { // and enums. optional string type = 3; - // Deprecated. Please use "repeated". - optional bool is_repeated = 4 [deprecated = true]; - // If true, indicates that the number is reserved in the extension range, // and any extension field with the number will fail to compile. Set this // when a declared extension field is deleted. @@ -157,6 +154,8 @@ message ExtensionRangeOptions { // If true, indicates that the extension must be defined as repeated. // Otherwise the extension must be defined as optional. optional bool repeated = 6; + + reserved 4; // removed is_repeated } // For external users: DO NOT USE. We are in the process of open sourcing @@ -164,6 +163,9 @@ message ExtensionRangeOptions { // used externally. repeated Declaration declaration = 2 [retention = RETENTION_SOURCE]; + // Any features defined in the specific edition. + optional FeatureSet features = 50; + // The verification state of the extension range. enum VerificationState { // All the extensions of the range must be declared. @@ -490,6 +492,9 @@ message FileOptions { // determining the ruby package. optional string ruby_package = 45; + // Any features defined in the specific edition. + optional FeatureSet features = 50; + // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999; @@ -573,6 +578,9 @@ message MessageOptions { // teams have had time to migrate. optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + // Any features defined in the specific edition. + optional FeatureSet features = 12; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -712,17 +720,28 @@ message FieldOptions { repeated OptionTargetType targets = 19; + message EditionDefault { + optional string edition = 1; + optional string value = 2; // Textproto value. + } + repeated EditionDefault edition_defaults = 20; + + // Any features defined in the specific edition. + optional FeatureSet features = 21; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; - reserved 4; // removed jtype - optional OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; + reserved 4; // removed jtype + reserved 18; // reserve target, target_obsolete_do_not_use } message OneofOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 1; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -753,6 +772,9 @@ message EnumOptions { // had time to migrate. optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + // Any features defined in the specific edition. + optional FeatureSet features = 7; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -767,6 +789,14 @@ message EnumValueOptions { // this is a formalization for deprecating enum values. optional bool deprecated = 1 [default = false]; + // Any features defined in the specific edition. + optional FeatureSet features = 2; + + // Indicate that fields annotated with this enum value should not be printed + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + optional bool debug_redact = 3 [default = false]; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -776,6 +806,9 @@ message EnumValueOptions { message ServiceOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 34; + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol @@ -818,6 +851,9 @@ message MethodOptions { optional IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; + // Any features defined in the specific edition. + optional FeatureSet features = 35; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -853,6 +889,99 @@ message UninterpretedOption { optional string aggregate_value = 8; } +// =================================================================== +// Features + +// TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are +// not well scoped. This means that each of the feature enums below can clash +// with each other. The short names we've chosen maximize call-site +// readability, but leave us very open to this scenario. A future feature will +// be designed and implemented to handle this, hopefully before we ever hit a +// conflict here. +message FeatureSet { + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0; + EXPLICIT = 1; + IMPLICIT = 2; + LEGACY_REQUIRED = 3; + } + optional FieldPresence field_presence = 1 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { edition: "2023", value: "EXPLICIT" } + ]; + + enum EnumType { + ENUM_TYPE_UNKNOWN = 0; + OPEN = 1; + CLOSED = 2; + } + optional EnumType enum_type = 2 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + edition_defaults = { edition: "2023", value: "OPEN" } + ]; + + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0; + PACKED = 1; + EXPANDED = 2; + } + optional RepeatedFieldEncoding repeated_field_encoding = 3 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { edition: "2023", value: "PACKED" } + ]; + + enum StringFieldValidation { + STRING_FIELD_VALIDATION_UNKNOWN = 0; + MANDATORY = 1; + HINT = 2; + NONE = 3; + } + optional StringFieldValidation string_field_validation = 4 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { edition: "2023", value: "MANDATORY" } + ]; + + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0; + LENGTH_PREFIXED = 1; + DELIMITED = 2; + } + optional MessageEncoding message_encoding = 5 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { edition: "2023", value: "LENGTH_PREFIXED" } + ]; + + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0; + ALLOW = 1; + LEGACY_BEST_EFFORT = 2; + } + optional JsonFormat json_format = 6 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_MESSAGE, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + edition_defaults = { edition: "2023", value: "ALLOW" } + ]; + + optional FeatureSet raw_features = 999 [targets = TARGET_TYPE_UNKNOWN]; + + extensions 1000; // for Protobuf C++ + extensions 1001; // for Protobuf Java + + extensions 9995 to 9999; // For internal testing +} + // =================================================================== // Optional source code info diff --git a/dev/protos/update.sh b/dev/protos/update.sh index ebb76974e..d97f127b0 100755 --- a/dev/protos/update.sh +++ b/dev/protos/update.sh @@ -17,6 +17,8 @@ set -euo pipefail IFS=$'\n\t' +echo "Running update.sh" + # Variables PROTOS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" WORK_DIR=`mktemp -d` @@ -122,7 +124,7 @@ perl -pi -e 's/number\|Long/number\|string/g' firestore_v1beta1_proto_api.js "${PROTOS_DIR}/google/protobuf/*.proto" "${PROTOS_DIR}/google/type/*.proto" \ "${PROTOS_DIR}/google/rpc/*.proto" "${PROTOS_DIR}/google/api/*.proto" -"${PBJS}" --proto_path=. --target=json -o v1_admin.json \ +"${PBJS}" --proto_path=. --target=json -o admin_v1.json \ -r firestore_admin_v1 \ "${PROTOS_DIR}/google/firestore/admin/v1/*.proto" \ "${PROTOS_DIR}/google/protobuf/*.proto" "${PROTOS_DIR}/google/type/*.proto" \ diff --git a/dev/protos/v1.json b/dev/protos/v1.json index 197f82599..863777736 100644 --- a/dev/protos/v1.json +++ b/dev/protos/v1.json @@ -930,7 +930,7 @@ "v1": { "options": { "csharp_namespace": "Google.Cloud.Firestore.V1", - "go_package": "google.golang.org/genproto/googleapis/firestore/v1;firestore", + "go_package": "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb", "java_multiple_files": true, "java_outer_classname": "WriteProto", "java_package": "com.google.firestore.v1", @@ -948,6 +948,30 @@ } } }, + "BitSequence": { + "fields": { + "bitmap": { + "type": "bytes", + "id": 1 + }, + "padding": { + "type": "int32", + "id": 2 + } + } + }, + "BloomFilter": { + "fields": { + "bits": { + "type": "BitSequence", + "id": 1 + }, + "hashCount": { + "type": "int32", + "id": 2 + } + } + }, "DocumentMask": { "fields": { "fieldPaths": { @@ -2108,6 +2132,10 @@ "once": { "type": "bool", "id": 6 + }, + "expectedCount": { + "type": "google.protobuf.Int32Value", + "id": 12 } }, "nested": { @@ -2480,7 +2508,9 @@ "oneofs": { "operator": { "oneof": [ - "count" + "count", + "sum", + "avg" ] } }, @@ -2489,6 +2519,14 @@ "type": "Count", "id": 1 }, + "sum": { + "type": "Sum", + "id": 2 + }, + "avg": { + "type": "Avg", + "id": 3 + }, "alias": { "type": "string", "id": 7, @@ -2508,6 +2546,22 @@ } } } + }, + "Sum": { + "fields": { + "field": { + "type": "StructuredQuery.FieldReference", + "id": 1 + } + } + }, + "Avg": { + "fields": { + "field": { + "type": "StructuredQuery.FieldReference", + "id": 1 + } + } } } } @@ -2705,6 +2759,10 @@ "count": { "type": "int32", "id": 2 + }, + "unchangedNames": { + "type": "BloomFilter", + "id": 3 } } } @@ -2921,6 +2979,10 @@ "rule": "repeated", "type": "ClientLibrarySettings", "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 } } }, @@ -2978,6 +3040,31 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 } } }, @@ -3037,7 +3124,10 @@ "CLOUD": 1, "ADS": 2, "PHOTOS": 3, - "STREET_VIEW": 4 + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 } }, "ClientLibraryDestination": { @@ -3212,4 +3302,4 @@ } } } -} +} \ No newline at end of file diff --git a/dev/protos/v1_admin.json b/dev/protos/v1_admin.json deleted file mode 100644 index 575bdd860..000000000 --- a/dev/protos/v1_admin.json +++ /dev/null @@ -1,2597 +0,0 @@ -{ - "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 - }, - "appEngineIntegrationMode": { - "type": "AppEngineIntegrationMode", - "id": 19 - }, - "keyPrefix": { - "type": "string", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "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 - } - }, - "AppEngineIntegrationMode": { - "values": { - "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2 - } - } - } - }, - "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 - }, - "ttlConfig": { - "type": "TtlConfig", - "id": 3 - } - }, - "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 - } - } - }, - "TtlConfig": { - "fields": { - "state": { - "type": "State", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "NEEDS_REPAIR": 3 - } - } - } - } - } - }, - "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": { - "QueryScope": { - "values": { - "QUERY_SCOPE_UNSPECIFIED": 0, - "COLLECTION": 1, - "COLLECTION_GROUP": 2 - } - }, - "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 - } - } - } - }, - "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 - }, - "ttlConfigDelta": { - "type": "TtlConfigDelta", - "id": 8 - } - }, - "nested": { - "IndexConfigDelta": { - "fields": { - "changeType": { - "type": "ChangeType", - "id": 1 - }, - "index": { - "type": "Index", - "id": 2 - } - }, - "nested": { - "ChangeType": { - "values": { - "CHANGE_TYPE_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "TtlConfigDelta": { - "fields": { - "changeType": { - "type": "ChangeType", - "id": 1 - } - }, - "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" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "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 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "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": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "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/v1beta1.json b/dev/protos/v1beta1.json index c399a1273..e2c143932 100644 --- a/dev/protos/v1beta1.json +++ b/dev/protos/v1beta1.json @@ -930,7 +930,7 @@ "v1beta1": { "options": { "csharp_namespace": "Google.Cloud.Firestore.V1Beta1", - "go_package": "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore", + "go_package": "cloud.google.com/go/firestore/apiv1beta1/firestorepb;firestorepb", "java_multiple_files": true, "java_outer_classname": "WriteProto", "java_package": "com.google.firestore.v1beta1", @@ -2724,6 +2724,10 @@ "rule": "repeated", "type": "ClientLibrarySettings", "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 } } }, @@ -2781,6 +2785,31 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 } } }, @@ -2840,7 +2869,10 @@ "CLOUD": 1, "ADS": 2, "PHOTOS": 3, - "STREET_VIEW": 4 + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 } }, "ClientLibraryDestination": { diff --git a/dev/src/v1/firestore_admin_client.ts b/dev/src/v1/firestore_admin_client.ts index 601532ce5..9022e1fa4 100644 --- a/dev/src/v1/firestore_admin_client.ts +++ b/dev/src/v1/firestore_admin_client.ts @@ -305,6 +305,12 @@ export class FirestoreAdminClient { const importDocumentsMetadata = protoFilesRoot.lookup( '.google.firestore.admin.v1.ImportDocumentsMetadata' ) as gax.protobuf.Type; + const createDatabaseResponse = protoFilesRoot.lookup( + '.google.firestore.admin.v1.Database' + ) as gax.protobuf.Type; + const createDatabaseMetadata = protoFilesRoot.lookup( + '.google.firestore.admin.v1.CreateDatabaseMetadata' + ) as gax.protobuf.Type; const updateDatabaseResponse = protoFilesRoot.lookup( '.google.firestore.admin.v1.Database' ) as gax.protobuf.Type; @@ -333,6 +339,11 @@ export class FirestoreAdminClient { importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata) ), + createDatabase: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDatabaseResponse.decode.bind(createDatabaseResponse), + createDatabaseMetadata.decode.bind(createDatabaseMetadata) + ), updateDatabase: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateDatabaseResponse.decode.bind(updateDatabaseResponse), @@ -399,6 +410,7 @@ export class FirestoreAdminClient { 'listFields', 'exportDocuments', 'importDocuments', + 'createDatabase', 'getDatabase', 'listDatabases', 'updateDatabase', @@ -502,9 +514,8 @@ export class FirestoreAdminClient { * @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 {@link google.firestore.admin.v1.Index | Index}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.admin.v1.Index|Index}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.get_index.js * region_tag:firestore_v1_generated_FirestoreAdmin_GetIndex_async @@ -586,9 +597,8 @@ export class FirestoreAdminClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.delete_index.js * region_tag:firestore_v1_generated_FirestoreAdmin_DeleteIndex_async @@ -672,9 +682,8 @@ export class FirestoreAdminClient { * @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 {@link google.firestore.admin.v1.Field | Field}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.admin.v1.Field|Field}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.get_field.js * region_tag:firestore_v1_generated_FirestoreAdmin_GetField_async @@ -756,9 +765,8 @@ export class FirestoreAdminClient { * @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 {@link google.firestore.admin.v1.Database | Database}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.admin.v1.Database|Database}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.get_database.js * region_tag:firestore_v1_generated_FirestoreAdmin_GetDatabase_async @@ -842,9 +850,8 @@ export class FirestoreAdminClient { * @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 {@link google.firestore.admin.v1.ListDatabasesResponse | ListDatabasesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.admin.v1.ListDatabasesResponse|ListDatabasesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.list_databases.js * region_tag:firestore_v1_generated_FirestoreAdmin_ListDatabases_async @@ -919,9 +926,11 @@ export class FirestoreAdminClient { } /** - * 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 - * the operation will be the type {@link google.firestore.admin.v1.IndexOperationMetadata|IndexOperationMetadata}. + * Creates a composite index. This returns a + * {@link protos.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 + * {@link protos.google.firestore.admin.v1.IndexOperationMetadata|IndexOperationMetadata}. * * @param {Object} request * The request object that will be sent. @@ -936,8 +945,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.create_index.js * region_tag:firestore_v1_generated_FirestoreAdmin_CreateIndex_async @@ -1032,8 +1040,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.create_index.js * region_tag:firestore_v1_generated_FirestoreAdmin_CreateIndex_async @@ -1064,13 +1071,16 @@ export class FirestoreAdminClient { /** * Updates a field configuration. Currently, field updates apply only to * single field index configuration. However, calls to - * {@link google.firestore.admin.v1.FirestoreAdmin.UpdateField|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" }`. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.UpdateField|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 {@link 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 {@link google.firestore.admin.v1.FieldOperationMetadata|FieldOperationMetadata}. + * This call returns a + * {@link protos.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 + * {@link protos.google.firestore.admin.v1.FieldOperationMetadata|FieldOperationMetadata}. * * To configure the default field settings for the database, use * the special `Field` with resource name: @@ -1089,8 +1099,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.update_field.js * region_tag:firestore_v1_generated_FirestoreAdmin_UpdateField_async @@ -1185,8 +1194,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.update_field.js * region_tag:firestore_v1_generated_FirestoreAdmin_UpdateField_async @@ -1249,8 +1257,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.export_documents.js * region_tag:firestore_v1_generated_FirestoreAdmin_ExportDocuments_async @@ -1345,8 +1352,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.export_documents.js * region_tag:firestore_v1_generated_FirestoreAdmin_ExportDocuments_async @@ -1394,15 +1400,14 @@ export class FirestoreAdminClient { * This must match the output_uri_prefix of an ExportDocumentsResponse from * an export that has completed successfully. * See: - * {@link google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix|google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. + * {@link protos.google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix|google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. * @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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.import_documents.js * region_tag:firestore_v1_generated_FirestoreAdmin_ImportDocuments_async @@ -1497,8 +1502,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.import_documents.js * region_tag:firestore_v1_generated_FirestoreAdmin_ImportDocuments_async @@ -1526,6 +1530,150 @@ export class FirestoreAdminClient { protos.google.firestore.admin.v1.ImportDocumentsMetadata >; } + /** + * Create a database. + * + * @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 {google.firestore.admin.v1.Database} request.database + * Required. The Database to create. + * @param {string} request.databaseId + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * + * The value must be set to "(default)". + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/firestore_admin.create_database.js + * region_tag:firestore_v1_generated_FirestoreAdmin_CreateDatabase_async + */ + createDatabase( + request?: protos.google.firestore.admin.v1.ICreateDatabaseRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createDatabase( + request: protos.google.firestore.admin.v1.ICreateDatabaseRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDatabase( + request: protos.google.firestore.admin.v1.ICreateDatabaseRequest, + callback: Callback< + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDatabase( + request?: protos.google.firestore.admin.v1.ICreateDatabaseRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createDatabase(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createDatabase()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/firestore_admin.create_database.js + * region_tag:firestore_v1_generated_FirestoreAdmin_CreateDatabase_async + */ + async checkCreateDatabaseProgress( + name: string + ): Promise< + LROperation< + protos.google.firestore.admin.v1.Database, + protos.google.firestore.admin.v1.CreateDatabaseMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createDatabase, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.firestore.admin.v1.Database, + protos.google.firestore.admin.v1.CreateDatabaseMetadata + >; + } /** * Updates a database. * @@ -1541,8 +1689,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.update_database.js * region_tag:firestore_v1_generated_FirestoreAdmin_UpdateDatabase_async @@ -1637,8 +1784,7 @@ export class FirestoreAdminClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.update_database.js * region_tag:firestore_v1_generated_FirestoreAdmin_UpdateDatabase_async @@ -1680,19 +1826,18 @@ export class FirestoreAdminClient { * The number of results to return. * @param {string} request.pageToken * A page token, returned from a previous call to - * {@link google.firestore.admin.v1.FirestoreAdmin.ListIndexes|FirestoreAdmin.ListIndexes}, that may be used to get the next - * page of results. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListIndexes|FirestoreAdmin.ListIndexes}, + * that may be used to get the next page of results. * @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 Array of {@link google.firestore.admin.v1.Index | Index}. + * The first element of the array is Array of {@link protos.google.firestore.admin.v1.Index|Index}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listIndexesAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listIndexes( @@ -1777,18 +1922,17 @@ export class FirestoreAdminClient { * The number of results to return. * @param {string} request.pageToken * A page token, returned from a previous call to - * {@link google.firestore.admin.v1.FirestoreAdmin.ListIndexes|FirestoreAdmin.ListIndexes}, that may be used to get the next - * page of results. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListIndexes|FirestoreAdmin.ListIndexes}, + * that may be used to get the next page of results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.firestore.admin.v1.Index | Index} on 'data' event. + * An object stream which emits an object representing {@link protos.google.firestore.admin.v1.Index|Index} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listIndexesAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listIndexesStream( @@ -1828,17 +1972,16 @@ export class FirestoreAdminClient { * The number of results to return. * @param {string} request.pageToken * A page token, returned from a previous call to - * {@link google.firestore.admin.v1.FirestoreAdmin.ListIndexes|FirestoreAdmin.ListIndexes}, that may be used to get the next - * page of results. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListIndexes|FirestoreAdmin.ListIndexes}, + * that may be used to get the next page of results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.firestore.admin.v1.Index | Index}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.firestore.admin.v1.Index|Index}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.list_indexes.js * region_tag:firestore_v1_generated_FirestoreAdmin_ListIndexes_async @@ -1867,10 +2010,12 @@ export class FirestoreAdminClient { /** * Lists the field configuration and metadata for this database. * - * 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` . + * Currently, + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} + * with the filter set to `indexConfig.usesAncestorConfig:false` . * * @param {Object} request * The request object that will be sent. @@ -1879,27 +2024,27 @@ export class FirestoreAdminClient { * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` * @param {string} request.filter * 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 a filter that includes - * `indexConfig.usesAncestorConfig:false` . + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * {@link protos.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 * A page token, returned from a previous call to - * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields}, that may be used to get the next - * page of results. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields}, + * that may be used to get the next page of results. * @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 Array of {@link google.firestore.admin.v1.Field | Field}. + * The first element of the array is Array of {@link protos.google.firestore.admin.v1.Field|Field}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listFieldsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listFields( @@ -1980,26 +2125,26 @@ export class FirestoreAdminClient { * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` * @param {string} request.filter * 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 a filter that includes - * `indexConfig.usesAncestorConfig:false` . + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * {@link protos.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 * A page token, returned from a previous call to - * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields}, that may be used to get the next - * page of results. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields}, + * that may be used to get the next page of results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.firestore.admin.v1.Field | Field} on 'data' event. + * An object stream which emits an object representing {@link protos.google.firestore.admin.v1.Field|Field} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listFieldsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listFieldsStream( @@ -2035,25 +2180,25 @@ export class FirestoreAdminClient { * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` * @param {string} request.filter * 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 a filter that includes - * `indexConfig.usesAncestorConfig:false` . + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields} + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * {@link protos.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 * A page token, returned from a previous call to - * {@link google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields}, that may be used to get the next - * page of results. + * {@link protos.google.firestore.admin.v1.FirestoreAdmin.ListFields|FirestoreAdmin.ListFields}, + * that may be used to get the next page of results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.firestore.admin.v1.Field | Field}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.firestore.admin.v1.Field|Field}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore_admin.list_fields.js * region_tag:firestore_v1_generated_FirestoreAdmin_ListFields_async @@ -2090,8 +2235,7 @@ export class FirestoreAdminClient { * 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 {@link google.cloud.location.Location | Location}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example * ``` @@ -2137,12 +2281,11 @@ export class FirestoreAdminClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example * ``` diff --git a/dev/src/v1/firestore_admin_client_config.json b/dev/src/v1/firestore_admin_client_config.json index f2b58181b..ee5860dbc 100644 --- a/dev/src/v1/firestore_admin_client_config.json +++ b/dev/src/v1/firestore_admin_client_config.json @@ -70,6 +70,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "CreateDatabase": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetDatabase": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/dev/src/v1/firestore_client.ts b/dev/src/v1/firestore_client.ts index 48cf4f453..1ad2a3a2b 100644 --- a/dev/src/v1/firestore_client.ts +++ b/dev/src/v1/firestore_client.ts @@ -417,13 +417,15 @@ export class FirestoreClient { * Reads the document in a transaction. * @param {google.protobuf.Timestamp} request.readTime * Reads the version of the document at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @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 {@link google.firestore.v1.Document | Document}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1.Document|Document}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.get_document.js * region_tag:firestore_v1_generated_Firestore_GetDocument_async @@ -521,9 +523,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1.Document | Document}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1.Document|Document}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.update_document.js * region_tag:firestore_v1_generated_Firestore_UpdateDocument_async @@ -608,9 +609,8 @@ export class FirestoreClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.delete_document.js * region_tag:firestore_v1_generated_Firestore_DeleteDocument_async @@ -695,9 +695,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1.BeginTransactionResponse | BeginTransactionResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1.BeginTransactionResponse|BeginTransactionResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.begin_transaction.js * region_tag:firestore_v1_generated_Firestore_BeginTransaction_async @@ -787,9 +786,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1.CommitResponse | CommitResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1.CommitResponse|CommitResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.commit.js * region_tag:firestore_v1_generated_Firestore_Commit_async @@ -873,9 +871,8 @@ export class FirestoreClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.rollback.js * region_tag:firestore_v1_generated_Firestore_Rollback_async @@ -952,11 +949,11 @@ export class FirestoreClient { * The BatchWrite method does not apply the write operations atomically * and can apply them out of order. Method does not allow more than one write * per document. Each write succeeds or fails independently. See the - * {@link google.firestore.v1.BatchWriteResponse|BatchWriteResponse} for the + * {@link protos.google.firestore.v1.BatchWriteResponse|BatchWriteResponse} for the * success status of each write. * * If you require an atomically applied set of writes, use - * {@link google.firestore.v1.Firestore.Commit|Commit} instead. + * {@link protos.google.firestore.v1.Firestore.Commit|Commit} instead. * * @param {Object} request * The request object that will be sent. @@ -974,9 +971,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1.BatchWriteResponse | BatchWriteResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1.BatchWriteResponse|BatchWriteResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.batch_write.js * region_tag:firestore_v1_generated_Firestore_BatchWrite_async @@ -1073,9 +1069,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1.Document | Document}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1.Document|Document}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.create_document.js * region_tag:firestore_v1_generated_Firestore_CreateDocument_async @@ -1178,13 +1173,15 @@ export class FirestoreClient { * stream. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits {@link google.firestore.v1.BatchGetDocumentsResponse | BatchGetDocumentsResponse} on 'data' event. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) + * An object stream which emits {@link protos.google.firestore.v1.BatchGetDocumentsResponse|BatchGetDocumentsResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.batch_get_documents.js * region_tag:firestore_v1_generated_Firestore_BatchGetDocuments_async @@ -1230,13 +1227,15 @@ export class FirestoreClient { * stream. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits {@link google.firestore.v1.RunQueryResponse | RunQueryResponse} on 'data' event. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) + * An object stream which emits {@link protos.google.firestore.v1.RunQueryResponse|RunQueryResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.run_query.js * region_tag:firestore_v1_generated_Firestore_RunQuery_async @@ -1260,10 +1259,10 @@ export class FirestoreClient { /** * Runs an aggregation query. * - * Rather than producing {@link google.firestore.v1.Document|Document} results like - * {@link google.firestore.v1.Firestore.RunQuery|Firestore.RunQuery}, this API + * Rather than producing {@link protos.google.firestore.v1.Document|Document} results like + * {@link protos.google.firestore.v1.Firestore.RunQuery|Firestore.RunQuery}, this API * allows running an aggregation to produce a series of - * {@link google.firestore.v1.AggregationResult|AggregationResult} server-side. + * {@link protos.google.firestore.v1.AggregationResult|AggregationResult} server-side. * * High-Level Example: * @@ -1295,15 +1294,14 @@ export class FirestoreClient { * @param {google.protobuf.Timestamp} request.readTime * Executes the query at the given timestamp. * - * Requires: - * - * * Cannot be more than 270 seconds in the past. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits {@link google.firestore.v1.RunAggregationQueryResponse | RunAggregationQueryResponse} on 'data' event. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) + * An object stream which emits {@link protos.google.firestore.v1.RunAggregationQueryResponse|RunAggregationQueryResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.run_aggregation_query.js * region_tag:firestore_v1_generated_Firestore_RunAggregationQuery_async @@ -1332,10 +1330,9 @@ export class FirestoreClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which is both readable and writable. It accepts objects - * representing {@link google.firestore.v1.WriteRequest | WriteRequest} for write() method, and - * will emit objects representing {@link google.firestore.v1.WriteResponse | WriteResponse} on 'data' event asynchronously. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * representing {@link protos.google.firestore.v1.WriteRequest|WriteRequest} for write() method, and + * will emit objects representing {@link protos.google.firestore.v1.WriteResponse|WriteResponse} on 'data' event asynchronously. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.write.js * region_tag:firestore_v1_generated_Firestore_Write_async @@ -1353,10 +1350,9 @@ export class FirestoreClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which is both readable and writable. It accepts objects - * representing {@link google.firestore.v1.ListenRequest | ListenRequest} for write() method, and - * will emit objects representing {@link google.firestore.v1.ListenResponse | ListenResponse} on 'data' event asynchronously. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * representing {@link protos.google.firestore.v1.ListenRequest|ListenRequest} for write() method, and + * will emit objects representing {@link protos.google.firestore.v1.ListenResponse|ListenResponse} on 'data' event asynchronously. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.listen.js * region_tag:firestore_v1_generated_Firestore_Listen_async @@ -1401,7 +1397,7 @@ export class FirestoreClient { * * For example: `priority desc, __name__ desc`. * - * This mirrors the {@link google.firestore.v1.StructuredQuery.order_by|`ORDER BY`} + * This mirrors the {@link protos.google.firestore.v1.StructuredQuery.order_by|`ORDER BY`} * used in Firestore queries but in a string representation. When absent, * documents are ordered based on `__name__ ASC`. * @param {google.firestore.v1.DocumentMask} [request.mask] @@ -1414,28 +1410,29 @@ export class FirestoreClient { * @param {google.protobuf.Timestamp} request.readTime * Perform the read at the provided time. * - * This may not be older than 270 seconds. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {boolean} request.showMissing * If the list should show missing documents. * * A document is missing if it does not exist, but there are sub-documents * nested underneath it. When true, such missing documents will be returned * with a key but will not have fields, - * {@link google.firestore.v1.Document.create_time|`create_time`}, or - * {@link google.firestore.v1.Document.update_time|`update_time`} set. + * {@link protos.google.firestore.v1.Document.create_time|`create_time`}, or + * {@link protos.google.firestore.v1.Document.update_time|`update_time`} set. * * Requests with `show_missing` may not specify `where` or `order_by`. * @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 Array of {@link google.firestore.v1.Document | Document}. + * The first element of the array is Array of {@link protos.google.firestore.v1.Document|Document}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listDocumentsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listDocuments( @@ -1540,7 +1537,7 @@ export class FirestoreClient { * * For example: `priority desc, __name__ desc`. * - * This mirrors the {@link google.firestore.v1.StructuredQuery.order_by|`ORDER BY`} + * This mirrors the {@link protos.google.firestore.v1.StructuredQuery.order_by|`ORDER BY`} * used in Firestore queries but in a string representation. When absent, * documents are ordered based on `__name__ ASC`. * @param {google.firestore.v1.DocumentMask} [request.mask] @@ -1553,27 +1550,28 @@ export class FirestoreClient { * @param {google.protobuf.Timestamp} request.readTime * Perform the read at the provided time. * - * This may not be older than 270 seconds. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {boolean} request.showMissing * If the list should show missing documents. * * A document is missing if it does not exist, but there are sub-documents * nested underneath it. When true, such missing documents will be returned * with a key but will not have fields, - * {@link google.firestore.v1.Document.create_time|`create_time`}, or - * {@link google.firestore.v1.Document.update_time|`update_time`} set. + * {@link protos.google.firestore.v1.Document.create_time|`create_time`}, or + * {@link protos.google.firestore.v1.Document.update_time|`update_time`} set. * * Requests with `show_missing` may not specify `where` or `order_by`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.firestore.v1.Document | Document} on 'data' event. + * An object stream which emits an object representing {@link protos.google.firestore.v1.Document|Document} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listDocumentsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listDocumentsStream( @@ -1635,7 +1633,7 @@ export class FirestoreClient { * * For example: `priority desc, __name__ desc`. * - * This mirrors the {@link google.firestore.v1.StructuredQuery.order_by|`ORDER BY`} + * This mirrors the {@link protos.google.firestore.v1.StructuredQuery.order_by|`ORDER BY`} * used in Firestore queries but in a string representation. When absent, * documents are ordered based on `__name__ ASC`. * @param {google.firestore.v1.DocumentMask} [request.mask] @@ -1648,26 +1646,27 @@ export class FirestoreClient { * @param {google.protobuf.Timestamp} request.readTime * Perform the read at the provided time. * - * This may not be older than 270 seconds. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {boolean} request.showMissing * If the list should show missing documents. * * A document is missing if it does not exist, but there are sub-documents * nested underneath it. When true, such missing documents will be returned * with a key but will not have fields, - * {@link google.firestore.v1.Document.create_time|`create_time`}, or - * {@link google.firestore.v1.Document.update_time|`update_time`} set. + * {@link protos.google.firestore.v1.Document.create_time|`create_time`}, or + * {@link protos.google.firestore.v1.Document.update_time|`update_time`} set. * * Requests with `show_missing` may not specify `where` or `order_by`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.firestore.v1.Document | Document}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.firestore.v1.Document|Document}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.list_documents.js * region_tag:firestore_v1_generated_Firestore_ListDocuments_async @@ -1744,18 +1743,20 @@ export class FirestoreClient { * 2 partitions, to complete the total of 10 specified in `partition_count`. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @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 Array of {@link google.firestore.v1.Cursor | Cursor}. + * The first element of the array is Array of {@link protos.google.firestore.v1.Cursor|Cursor}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `partitionQueryAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ partitionQuery( @@ -1872,17 +1873,19 @@ export class FirestoreClient { * 2 partitions, to complete the total of 10 specified in `partition_count`. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.firestore.v1.Cursor | Cursor} on 'data' event. + * An object stream which emits an object representing {@link protos.google.firestore.v1.Cursor|Cursor} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `partitionQueryAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ partitionQueryStream( @@ -1956,16 +1959,18 @@ export class FirestoreClient { * 2 partitions, to complete the total of 10 specified in `partition_count`. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.firestore.v1.Cursor | Cursor}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.firestore.v1.Cursor|Cursor}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.partition_query.js * region_tag:firestore_v1_generated_Firestore_PartitionQuery_async @@ -2005,10 +2010,13 @@ export class FirestoreClient { * The maximum number of results to return. * @param {string} request.pageToken * A page token. Must be a value from - * {@link google.firestore.v1.ListCollectionIdsResponse|ListCollectionIdsResponse}. + * {@link protos.google.firestore.v1.ListCollectionIdsResponse|ListCollectionIdsResponse}. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @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. @@ -2018,8 +2026,7 @@ export class FirestoreClient { * Note that it can affect your quota. * We recommend using `listCollectionIdsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listCollectionIds( @@ -2104,10 +2111,13 @@ export class FirestoreClient { * The maximum number of results to return. * @param {string} request.pageToken * A page token. Must be a value from - * {@link google.firestore.v1.ListCollectionIdsResponse|ListCollectionIdsResponse}. + * {@link protos.google.firestore.v1.ListCollectionIdsResponse|ListCollectionIdsResponse}. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2116,8 +2126,7 @@ export class FirestoreClient { * times as needed. Note that it can affect your quota. * We recommend using `listCollectionIdsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listCollectionIdsStream( @@ -2157,19 +2166,21 @@ export class FirestoreClient { * The maximum number of results to return. * @param {string} request.pageToken * A page token. Must be a value from - * {@link google.firestore.v1.ListCollectionIdsResponse|ListCollectionIdsResponse}. + * {@link protos.google.firestore.v1.ListCollectionIdsResponse|ListCollectionIdsResponse}. * @param {google.protobuf.Timestamp} request.readTime * Reads documents as they were at the given time. - * This may not be older than 270 seconds. + * + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * string. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/firestore.list_collection_ids.js * region_tag:firestore_v1_generated_Firestore_ListCollectionIds_async @@ -2206,8 +2217,7 @@ export class FirestoreClient { * 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 {@link google.cloud.location.Location | Location}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example * ``` @@ -2253,12 +2263,11 @@ export class FirestoreClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example * ``` diff --git a/dev/src/v1beta1/firestore_client.ts b/dev/src/v1beta1/firestore_client.ts index ad748d8e6..85c38e538 100644 --- a/dev/src/v1beta1/firestore_client.ts +++ b/dev/src/v1beta1/firestore_client.ts @@ -412,9 +412,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1beta1.Document | Document}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.Document|Document}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.get_document.js * region_tag:firestore_v1beta1_generated_Firestore_GetDocument_async @@ -514,9 +513,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1beta1.Document | Document}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.Document|Document}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.update_document.js * region_tag:firestore_v1beta1_generated_Firestore_UpdateDocument_async @@ -603,9 +601,8 @@ export class FirestoreClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.delete_document.js * region_tag:firestore_v1beta1_generated_Firestore_DeleteDocument_async @@ -692,9 +689,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1beta1.BeginTransactionResponse | BeginTransactionResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.BeginTransactionResponse|BeginTransactionResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.begin_transaction.js * region_tag:firestore_v1beta1_generated_Firestore_BeginTransaction_async @@ -790,9 +786,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1beta1.CommitResponse | CommitResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.CommitResponse|CommitResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.commit.js * region_tag:firestore_v1beta1_generated_Firestore_Commit_async @@ -876,9 +871,8 @@ export class FirestoreClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.rollback.js * region_tag:firestore_v1beta1_generated_Firestore_Rollback_async @@ -955,10 +949,10 @@ export class FirestoreClient { * The BatchWrite method does not apply the write operations atomically * and can apply them out of order. Method does not allow more than one write * per document. Each write succeeds or fails independently. See the - * {@link google.firestore.v1beta1.BatchWriteResponse|BatchWriteResponse} for the success status of each write. + * {@link protos.google.firestore.v1beta1.BatchWriteResponse|BatchWriteResponse} for the success status of each write. * * If you require an atomically applied set of writes, use - * {@link google.firestore.v1beta1.Firestore.Commit|Commit} instead. + * {@link protos.google.firestore.v1beta1.Firestore.Commit|Commit} instead. * * @param {Object} request * The request object that will be sent. @@ -976,9 +970,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1beta1.BatchWriteResponse | BatchWriteResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.BatchWriteResponse|BatchWriteResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.batch_write.js * region_tag:firestore_v1beta1_generated_Firestore_BatchWrite_async @@ -1074,9 +1067,8 @@ export class FirestoreClient { * @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 {@link google.firestore.v1beta1.Document | Document}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.Document|Document}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.create_document.js * region_tag:firestore_v1beta1_generated_Firestore_CreateDocument_async @@ -1185,9 +1177,8 @@ export class FirestoreClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits {@link google.firestore.v1beta1.BatchGetDocumentsResponse | BatchGetDocumentsResponse} on 'data' event. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) + * An object stream which emits {@link protos.google.firestore.v1beta1.BatchGetDocumentsResponse|BatchGetDocumentsResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.batch_get_documents.js * region_tag:firestore_v1beta1_generated_Firestore_BatchGetDocuments_async @@ -1235,9 +1226,8 @@ export class FirestoreClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits {@link google.firestore.v1beta1.RunQueryResponse | RunQueryResponse} on 'data' event. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) + * An object stream which emits {@link protos.google.firestore.v1beta1.RunQueryResponse|RunQueryResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.run_query.js * region_tag:firestore_v1beta1_generated_Firestore_RunQuery_async @@ -1265,10 +1255,9 @@ export class FirestoreClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which is both readable and writable. It accepts objects - * representing {@link google.firestore.v1beta1.WriteRequest | WriteRequest} for write() method, and - * will emit objects representing {@link google.firestore.v1beta1.WriteResponse | WriteResponse} on 'data' event asynchronously. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * representing {@link protos.google.firestore.v1beta1.WriteRequest|WriteRequest} for write() method, and + * will emit objects representing {@link protos.google.firestore.v1beta1.WriteResponse|WriteResponse} on 'data' event asynchronously. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.write.js * region_tag:firestore_v1beta1_generated_Firestore_Write_async @@ -1285,10 +1274,9 @@ export class FirestoreClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which is both readable and writable. It accepts objects - * representing {@link google.firestore.v1beta1.ListenRequest | ListenRequest} for write() method, and - * will emit objects representing {@link google.firestore.v1beta1.ListenResponse | ListenResponse} on 'data' event asynchronously. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * representing {@link protos.google.firestore.v1beta1.ListenRequest|ListenRequest} for write() method, and + * will emit objects representing {@link protos.google.firestore.v1beta1.ListenResponse|ListenResponse} on 'data' event asynchronously. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.listen.js * region_tag:firestore_v1beta1_generated_Firestore_Listen_async @@ -1332,22 +1320,21 @@ export class FirestoreClient { * @param {boolean} request.showMissing * 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, {@link google.firestore.v1beta1.Document.create_time|Document.create_time}, - * or {@link google.firestore.v1beta1.Document.update_time|Document.update_time} set. + * be returned with a key but will not have fields, {@link protos.google.firestore.v1beta1.Document.create_time|Document.create_time}, + * or {@link protos.google.firestore.v1beta1.Document.update_time|Document.update_time} set. * * Requests with `show_missing` may not specify `where` or * `order_by`. * @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 Array of {@link google.firestore.v1beta1.Document | Document}. + * The first element of the array is Array of {@link protos.google.firestore.v1beta1.Document|Document}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listDocumentsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listDocuments( @@ -1453,21 +1440,20 @@ export class FirestoreClient { * @param {boolean} request.showMissing * 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, {@link google.firestore.v1beta1.Document.create_time|Document.create_time}, - * or {@link google.firestore.v1beta1.Document.update_time|Document.update_time} set. + * be returned with a key but will not have fields, {@link protos.google.firestore.v1beta1.Document.create_time|Document.create_time}, + * or {@link protos.google.firestore.v1beta1.Document.update_time|Document.update_time} set. * * Requests with `show_missing` may not specify `where` or * `order_by`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.firestore.v1beta1.Document | Document} on 'data' event. + * An object stream which emits an object representing {@link protos.google.firestore.v1beta1.Document|Document} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listDocumentsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listDocumentsStream( @@ -1528,20 +1514,19 @@ export class FirestoreClient { * @param {boolean} request.showMissing * 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, {@link google.firestore.v1beta1.Document.create_time|Document.create_time}, - * or {@link google.firestore.v1beta1.Document.update_time|Document.update_time} set. + * be returned with a key but will not have fields, {@link protos.google.firestore.v1beta1.Document.create_time|Document.create_time}, + * or {@link protos.google.firestore.v1beta1.Document.update_time|Document.update_time} set. * * Requests with `show_missing` may not specify `where` or * `order_by`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.firestore.v1beta1.Document | Document}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.firestore.v1beta1.Document|Document}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.list_documents.js * region_tag:firestore_v1beta1_generated_Firestore_ListDocuments_async @@ -1619,14 +1604,13 @@ export class FirestoreClient { * @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 Array of {@link google.firestore.v1beta1.Cursor | Cursor}. + * The first element of the array is Array of {@link protos.google.firestore.v1beta1.Cursor|Cursor}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `partitionQueryAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ partitionQuery( @@ -1752,13 +1736,12 @@ export class FirestoreClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.firestore.v1beta1.Cursor | Cursor} on 'data' event. + * An object stream which emits an object representing {@link protos.google.firestore.v1beta1.Cursor|Cursor} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `partitionQueryAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ partitionQueryStream( @@ -1833,12 +1816,11 @@ export class FirestoreClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.firestore.v1beta1.Cursor | Cursor}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.firestore.v1beta1.Cursor|Cursor}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.partition_query.js * region_tag:firestore_v1beta1_generated_Firestore_PartitionQuery_async @@ -1878,7 +1860,7 @@ export class FirestoreClient { * The maximum number of results to return. * @param {string} request.pageToken * A page token. Must be a value from - * {@link google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}. + * {@link protos.google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}. * @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. @@ -1888,8 +1870,7 @@ export class FirestoreClient { * Note that it can affect your quota. * We recommend using `listCollectionIdsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listCollectionIds( @@ -1980,7 +1961,7 @@ export class FirestoreClient { * The maximum number of results to return. * @param {string} request.pageToken * A page token. Must be a value from - * {@link google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}. + * {@link protos.google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1989,8 +1970,7 @@ export class FirestoreClient { * times as needed. Note that it can affect your quota. * We recommend using `listCollectionIdsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listCollectionIdsStream( @@ -2030,16 +2010,15 @@ export class FirestoreClient { * The maximum number of results to return. * @param {string} request.pageToken * A page token. Must be a value from - * {@link google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}. + * {@link protos.google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * string. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1beta1/firestore.list_collection_ids.js * region_tag:firestore_v1beta1_generated_Firestore_ListCollectionIds_async diff --git a/dev/test/gapic_firestore_admin_v1.ts b/dev/test/gapic_firestore_admin_v1.ts index a9cc7e06d..904c246a6 100644 --- a/dev/test/gapic_firestore_admin_v1.ts +++ b/dev/test/gapic_firestore_admin_v1.ts @@ -1678,6 +1678,200 @@ describe('v1.FirestoreAdminClient', () => { }); }); + describe('createDatabase', () => { + it('invokes createDatabase without error', async () => { + const client = new firestoreadminModule.FirestoreAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.firestore.admin.v1.CreateDatabaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.firestore.admin.v1.CreateDatabaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDatabase = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createDatabase(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDatabase without error using callback', async () => { + const client = new firestoreadminModule.FirestoreAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.firestore.admin.v1.CreateDatabaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.firestore.admin.v1.CreateDatabaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDatabase = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDatabase( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.firestore.admin.v1.IDatabase, + protos.google.firestore.admin.v1.ICreateDatabaseMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDatabase with call error', async () => { + const client = new firestoreadminModule.FirestoreAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.firestore.admin.v1.CreateDatabaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.firestore.admin.v1.CreateDatabaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDatabase = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createDatabase(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDatabase with LRO error', async () => { + const client = new firestoreadminModule.FirestoreAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.firestore.admin.v1.CreateDatabaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.firestore.admin.v1.CreateDatabaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDatabase = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createDatabase(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDatabase as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDatabaseProgress without error', async () => { + const client = new firestoreadminModule.FirestoreAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateDatabaseProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDatabaseProgress with error', async () => { + const client = new firestoreadminModule.FirestoreAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateDatabaseProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('updateDatabase', () => { it('invokes updateDatabase without error', async () => { const client = new firestoreadminModule.FirestoreAdminClient({