@google-cloud/firestore
Version:
Firestore Client Library for Node.js
1,076 lines (832 loc) • 414 kB
TypeScript
/*!
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as $protobuf from "protobufjs";
/** Namespace google. */
export namespace google {
/** Namespace firestore. */
namespace firestore {
/** Namespace admin. */
namespace admin {
/** Namespace v1. */
namespace v1 {
/** Properties of a Backup. */
interface IBackup {
/** Backup name */
name?: (string|null);
/** Backup database */
database?: (string|null);
/** Backup databaseUid */
databaseUid?: (string|null);
/** Backup snapshotTime */
snapshotTime?: (google.protobuf.ITimestamp|null);
/** Backup expireTime */
expireTime?: (google.protobuf.ITimestamp|null);
/** Backup stats */
stats?: (google.firestore.admin.v1.Backup.IStats|null);
/** Backup state */
state?: (google.firestore.admin.v1.Backup.State|null);
}
/** Represents a Backup. */
class Backup implements IBackup {
/**
* Constructs a new Backup.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.IBackup);
/** Backup name. */
public name: string;
/** Backup database. */
public database: string;
/** Backup databaseUid. */
public databaseUid: string;
/** Backup snapshotTime. */
public snapshotTime?: (google.protobuf.ITimestamp|null);
/** Backup expireTime. */
public expireTime?: (google.protobuf.ITimestamp|null);
/** Backup stats. */
public stats?: (google.firestore.admin.v1.Backup.IStats|null);
/** Backup state. */
public state: google.firestore.admin.v1.Backup.State;
/**
* Creates a Backup message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Backup
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Backup;
/**
* Creates a plain object from a Backup message. Also converts values to other types if specified.
* @param message Backup
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Backup to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Backup
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace Backup {
/** Properties of a Stats. */
interface IStats {
/** Stats sizeBytes */
sizeBytes?: (number|string|null);
/** Stats documentCount */
documentCount?: (number|string|null);
/** Stats indexCount */
indexCount?: (number|string|null);
}
/** Represents a Stats. */
class Stats implements IStats {
/**
* Constructs a new Stats.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Backup.IStats);
/** Stats sizeBytes. */
public sizeBytes: (number|string);
/** Stats documentCount. */
public documentCount: (number|string);
/** Stats indexCount. */
public indexCount: (number|string);
/**
* Creates a Stats message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Stats
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Backup.Stats;
/**
* Creates a plain object from a Stats message. Also converts values to other types if specified.
* @param message Stats
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Backup.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Stats to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Stats
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** State enum. */
type State =
"STATE_UNSPECIFIED"| "CREATING"| "READY"| "NOT_AVAILABLE";
}
/** Properties of a Database. */
interface IDatabase {
/** Database name */
name?: (string|null);
/** Database uid */
uid?: (string|null);
/** Database createTime */
createTime?: (google.protobuf.ITimestamp|null);
/** Database updateTime */
updateTime?: (google.protobuf.ITimestamp|null);
/** Database deleteTime */
deleteTime?: (google.protobuf.ITimestamp|null);
/** Database locationId */
locationId?: (string|null);
/** Database type */
type?: (google.firestore.admin.v1.Database.DatabaseType|null);
/** Database concurrencyMode */
concurrencyMode?: (google.firestore.admin.v1.Database.ConcurrencyMode|null);
/** Database versionRetentionPeriod */
versionRetentionPeriod?: (google.protobuf.IDuration|null);
/** Database earliestVersionTime */
earliestVersionTime?: (google.protobuf.ITimestamp|null);
/** Database pointInTimeRecoveryEnablement */
pointInTimeRecoveryEnablement?: (google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement|null);
/** Database appEngineIntegrationMode */
appEngineIntegrationMode?: (google.firestore.admin.v1.Database.AppEngineIntegrationMode|null);
/** Database keyPrefix */
keyPrefix?: (string|null);
/** Database deleteProtectionState */
deleteProtectionState?: (google.firestore.admin.v1.Database.DeleteProtectionState|null);
/** Database cmekConfig */
cmekConfig?: (google.firestore.admin.v1.Database.ICmekConfig|null);
/** Database previousId */
previousId?: (string|null);
/** Database sourceInfo */
sourceInfo?: (google.firestore.admin.v1.Database.ISourceInfo|null);
/** Database etag */
etag?: (string|null);
}
/** Represents a Database. */
class Database implements IDatabase {
/**
* Constructs a new Database.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.IDatabase);
/** Database name. */
public name: string;
/** Database uid. */
public uid: string;
/** Database createTime. */
public createTime?: (google.protobuf.ITimestamp|null);
/** Database updateTime. */
public updateTime?: (google.protobuf.ITimestamp|null);
/** Database deleteTime. */
public deleteTime?: (google.protobuf.ITimestamp|null);
/** Database locationId. */
public locationId: string;
/** Database type. */
public type: google.firestore.admin.v1.Database.DatabaseType;
/** Database concurrencyMode. */
public concurrencyMode: google.firestore.admin.v1.Database.ConcurrencyMode;
/** Database versionRetentionPeriod. */
public versionRetentionPeriod?: (google.protobuf.IDuration|null);
/** Database earliestVersionTime. */
public earliestVersionTime?: (google.protobuf.ITimestamp|null);
/** Database pointInTimeRecoveryEnablement. */
public pointInTimeRecoveryEnablement: google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement;
/** Database appEngineIntegrationMode. */
public appEngineIntegrationMode: google.firestore.admin.v1.Database.AppEngineIntegrationMode;
/** Database keyPrefix. */
public keyPrefix: string;
/** Database deleteProtectionState. */
public deleteProtectionState: google.firestore.admin.v1.Database.DeleteProtectionState;
/** Database cmekConfig. */
public cmekConfig?: (google.firestore.admin.v1.Database.ICmekConfig|null);
/** Database previousId. */
public previousId: string;
/** Database sourceInfo. */
public sourceInfo?: (google.firestore.admin.v1.Database.ISourceInfo|null);
/** Database etag. */
public etag: string;
/**
* Creates a Database message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Database
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database;
/**
* Creates a plain object from a Database message. Also converts values to other types if specified.
* @param message Database
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Database to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Database
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace Database {
/** DatabaseType enum. */
type DatabaseType =
"DATABASE_TYPE_UNSPECIFIED"| "FIRESTORE_NATIVE"| "DATASTORE_MODE";
/** ConcurrencyMode enum. */
type ConcurrencyMode =
"CONCURRENCY_MODE_UNSPECIFIED"| "OPTIMISTIC"| "PESSIMISTIC"| "OPTIMISTIC_WITH_ENTITY_GROUPS";
/** PointInTimeRecoveryEnablement enum. */
type PointInTimeRecoveryEnablement =
"POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"| "POINT_IN_TIME_RECOVERY_ENABLED"| "POINT_IN_TIME_RECOVERY_DISABLED";
/** AppEngineIntegrationMode enum. */
type AppEngineIntegrationMode =
"APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"| "ENABLED"| "DISABLED";
/** DeleteProtectionState enum. */
type DeleteProtectionState =
"DELETE_PROTECTION_STATE_UNSPECIFIED"| "DELETE_PROTECTION_DISABLED"| "DELETE_PROTECTION_ENABLED";
/** Properties of a CmekConfig. */
interface ICmekConfig {
/** CmekConfig kmsKeyName */
kmsKeyName?: (string|null);
/** CmekConfig activeKeyVersion */
activeKeyVersion?: (string[]|null);
}
/** Represents a CmekConfig. */
class CmekConfig implements ICmekConfig {
/**
* Constructs a new CmekConfig.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.ICmekConfig);
/** CmekConfig kmsKeyName. */
public kmsKeyName: string;
/** CmekConfig activeKeyVersion. */
public activeKeyVersion: string[];
/**
* Creates a CmekConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns CmekConfig
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.CmekConfig;
/**
* Creates a plain object from a CmekConfig message. Also converts values to other types if specified.
* @param message CmekConfig
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.CmekConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this CmekConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for CmekConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a SourceInfo. */
interface ISourceInfo {
/** SourceInfo backup */
backup?: (google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null);
/** SourceInfo operation */
operation?: (string|null);
}
/** Represents a SourceInfo. */
class SourceInfo implements ISourceInfo {
/**
* Constructs a new SourceInfo.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.ISourceInfo);
/** SourceInfo backup. */
public backup?: (google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null);
/** SourceInfo operation. */
public operation: string;
/** SourceInfo source. */
public source?: "backup";
/**
* Creates a SourceInfo message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns SourceInfo
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.SourceInfo;
/**
* Creates a plain object from a SourceInfo message. Also converts values to other types if specified.
* @param message SourceInfo
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.SourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this SourceInfo to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for SourceInfo
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace SourceInfo {
/** Properties of a BackupSource. */
interface IBackupSource {
/** BackupSource backup */
backup?: (string|null);
}
/** Represents a BackupSource. */
class BackupSource implements IBackupSource {
/**
* Constructs a new BackupSource.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.SourceInfo.IBackupSource);
/** BackupSource backup. */
public backup: string;
/**
* Creates a BackupSource message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BackupSource
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.SourceInfo.BackupSource;
/**
* Creates a plain object from a BackupSource message. Also converts values to other types if specified.
* @param message BackupSource
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.SourceInfo.BackupSource, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BackupSource to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BackupSource
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
/** Properties of an EncryptionConfig. */
interface IEncryptionConfig {
/** EncryptionConfig googleDefaultEncryption */
googleDefaultEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null);
/** EncryptionConfig useSourceEncryption */
useSourceEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null);
/** EncryptionConfig customerManagedEncryption */
customerManagedEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null);
}
/** Represents an EncryptionConfig. */
class EncryptionConfig implements IEncryptionConfig {
/**
* Constructs a new EncryptionConfig.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.IEncryptionConfig);
/** EncryptionConfig googleDefaultEncryption. */
public googleDefaultEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null);
/** EncryptionConfig useSourceEncryption. */
public useSourceEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null);
/** EncryptionConfig customerManagedEncryption. */
public customerManagedEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null);
/** EncryptionConfig encryptionType. */
public encryptionType?: ("googleDefaultEncryption"|"useSourceEncryption"|"customerManagedEncryption");
/**
* Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns EncryptionConfig
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig;
/**
* Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified.
* @param message EncryptionConfig
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this EncryptionConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for EncryptionConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace EncryptionConfig {
/** Properties of a GoogleDefaultEncryptionOptions. */
interface IGoogleDefaultEncryptionOptions {
}
/** Represents a GoogleDefaultEncryptionOptions. */
class GoogleDefaultEncryptionOptions implements IGoogleDefaultEncryptionOptions {
/**
* Constructs a new GoogleDefaultEncryptionOptions.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions);
/**
* Creates a GoogleDefaultEncryptionOptions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns GoogleDefaultEncryptionOptions
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions;
/**
* Creates a plain object from a GoogleDefaultEncryptionOptions message. Also converts values to other types if specified.
* @param message GoogleDefaultEncryptionOptions
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this GoogleDefaultEncryptionOptions to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for GoogleDefaultEncryptionOptions
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a SourceEncryptionOptions. */
interface ISourceEncryptionOptions {
}
/** Represents a SourceEncryptionOptions. */
class SourceEncryptionOptions implements ISourceEncryptionOptions {
/**
* Constructs a new SourceEncryptionOptions.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions);
/**
* Creates a SourceEncryptionOptions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns SourceEncryptionOptions
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions;
/**
* Creates a plain object from a SourceEncryptionOptions message. Also converts values to other types if specified.
* @param message SourceEncryptionOptions
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this SourceEncryptionOptions to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for SourceEncryptionOptions
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a CustomerManagedEncryptionOptions. */
interface ICustomerManagedEncryptionOptions {
/** CustomerManagedEncryptionOptions kmsKeyName */
kmsKeyName?: (string|null);
}
/** Represents a CustomerManagedEncryptionOptions. */
class CustomerManagedEncryptionOptions implements ICustomerManagedEncryptionOptions {
/**
* Constructs a new CustomerManagedEncryptionOptions.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions);
/** CustomerManagedEncryptionOptions kmsKeyName. */
public kmsKeyName: string;
/**
* Creates a CustomerManagedEncryptionOptions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns CustomerManagedEncryptionOptions
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions;
/**
* Creates a plain object from a CustomerManagedEncryptionOptions message. Also converts values to other types if specified.
* @param message CustomerManagedEncryptionOptions
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this CustomerManagedEncryptionOptions to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for CustomerManagedEncryptionOptions
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
}
/** Properties of a Field. */
interface IField {
/** Field name */
name?: (string|null);
/** Field indexConfig */
indexConfig?: (google.firestore.admin.v1.Field.IIndexConfig|null);
/** Field ttlConfig */
ttlConfig?: (google.firestore.admin.v1.Field.ITtlConfig|null);
}
/** Represents a Field. */
class Field implements IField {
/**
* Constructs a new Field.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.IField);
/** Field name. */
public name: string;
/** Field indexConfig. */
public indexConfig?: (google.firestore.admin.v1.Field.IIndexConfig|null);
/** Field ttlConfig. */
public ttlConfig?: (google.firestore.admin.v1.Field.ITtlConfig|null);
/**
* Creates a Field message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Field
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Field;
/**
* Creates a plain object from a Field message. Also converts values to other types if specified.
* @param message Field
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Field, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Field to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Field
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace Field {
/** Properties of an IndexConfig. */
interface IIndexConfig {
/** IndexConfig indexes */
indexes?: (google.firestore.admin.v1.IIndex[]|null);
/** IndexConfig usesAncestorConfig */
usesAncestorConfig?: (boolean|null);
/** IndexConfig ancestorField */
ancestorField?: (string|null);
/** IndexConfig reverting */
reverting?: (boolean|null);
}
/** Represents an IndexConfig. */
class IndexConfig implements IIndexConfig {
/**
* Constructs a new IndexConfig.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Field.IIndexConfig);
/** IndexConfig indexes. */
public indexes: google.firestore.admin.v1.IIndex[];
/** IndexConfig usesAncestorConfig. */
public usesAncestorConfig: boolean;
/** IndexConfig ancestorField. */
public ancestorField: string;
/** IndexConfig reverting. */
public reverting: boolean;
/**
* Creates an IndexConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns IndexConfig
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Field.IndexConfig;
/**
* Creates a plain object from an IndexConfig message. Also converts values to other types if specified.
* @param message IndexConfig
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Field.IndexConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this IndexConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for IndexConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a TtlConfig. */
interface ITtlConfig {
/** TtlConfig state */
state?: (google.firestore.admin.v1.Field.TtlConfig.State|null);
}
/** Represents a TtlConfig. */
class TtlConfig implements ITtlConfig {
/**
* Constructs a new TtlConfig.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Field.ITtlConfig);
/** TtlConfig state. */
public state: google.firestore.admin.v1.Field.TtlConfig.State;
/**
* Creates a TtlConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns TtlConfig
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Field.TtlConfig;
/**
* Creates a plain object from a TtlConfig message. Also converts values to other types if specified.
* @param message TtlConfig
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Field.TtlConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this TtlConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for TtlConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace TtlConfig {
/** State enum. */
type State =
"STATE_UNSPECIFIED"| "CREATING"| "ACTIVE"| "NEEDS_REPAIR";
}
}
/** Properties of an Index. */
interface IIndex {
/** Index name */
name?: (string|null);
/** 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);
/** Index state */
state?: (google.firestore.admin.v1.Index.State|null);
}
/** Represents an Index. */
class Index implements IIndex {
/**
* Constructs a new Index.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.IIndex);
/** Index name. */
public name: string;
/** 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[];
/** Index state. */
public state: google.firestore.admin.v1.Index.State;
/**
* Creates an Index message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Index
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Index;
/**
* Creates a plain object from an Index message. Also converts values to other types if specified.
* @param message Index
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Index, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Index to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Index
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace Index {
/** QueryScope enum. */
type QueryScope =
"QUERY_SCOPE_UNSPECIFIED"| "COLLECTION"| "COLLECTION_GROUP"| "COLLECTION_RECURSIVE";
/** ApiScope enum. */
type ApiScope =
"ANY_API"| "DATASTORE_MODE_API";
/** Properties of an IndexField. */
interface IIndexField {
/** IndexField fieldPath */
fieldPath?: (string|null);
/** IndexField order */
order?: (google.firestore.admin.v1.Index.IndexField.Order|null);
/** IndexField arrayConfig */
arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null);
/** IndexField vectorConfig */
vectorConfig?: (google.firestore.admin.v1.Index.IndexField.IVectorConfig|null);
}
/** Represents an IndexField. */
class IndexField implements IIndexField {
/**
* Constructs a new IndexField.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Index.IIndexField);
/** IndexField fieldPath. */
public fieldPath: string;
/** IndexField order. */
public order?: (google.firestore.admin.v1.Index.IndexField.Order|null);
/** IndexField arrayConfig. */
public arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null);
/** IndexField vectorConfig. */
public vectorConfig?: (google.firestore.admin.v1.Index.IndexField.IVectorConfig|null);
/** IndexField valueMode. */
public valueMode?: ("order"|"arrayConfig"|"vectorConfig");
/**
* Creates an IndexField message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns IndexField
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Index.IndexField;
/**
* Creates a plain object from an IndexField message. Also converts values to other types if specified.
* @param message IndexField
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Index.IndexField, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this IndexField to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for IndexField
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace IndexField {
/** Order enum. */
type Order =
"ORDER_UNSPECIFIED"| "ASCENDING"| "DESCENDING";
/** ArrayConfig enum. */
type ArrayConfig =
"ARRAY_CONFIG_UNSPECIFIED"| "CONTAINS";
/** Properties of a VectorConfig. */
interface IVectorConfig {
/** VectorConfig dimension */
dimension?: (number|null);
/** VectorConfig flat */
flat?: (google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex|null);
}
/** Represents a VectorConfig. */
class VectorConfig implements IVectorConfig {
/**
* Constructs a new VectorConfig.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Index.IndexField.IVec